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

; 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"

%struct.uf = type { [200010 x i32], [200010 x i32] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.0" = type { %"struct.std::pair", i32 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.2" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"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 }

@u = external dso_local global %struct.uf, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@adjcol = external dso_local global [100005 x %"class.std::vector"], align 16
@es = external dso_local global [100005 x %"struct.std::pair.0"], align 16
@degsum = external dso_local global [100005 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

42:                                               ; preds = %65, %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) #8
  br label %68

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = add nsw i32 %49, -1
  store i32 %50, ptr %3, align 4, !tbaa !5
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = add nsw i32 %51, -1
  store i32 %52, ptr %4, align 4, !tbaa !5
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %54
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %57
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %59 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i64 %59, ptr %7, align 4
  %60 = call { i64, i32 } @_ZSt9make_pairISt4pairIiiERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store { i64, i32 } %60, ptr %8, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 8 %8, i64 12, i1 false)
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100005 x %"struct.std::pair.0"], ptr @es, i64 0, i64 %62
  %64 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt4pairIS_IiiEiEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %63, ptr noundef nonnull align 4 dereferenceable(12) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %65

65:                                               ; preds = %47
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %2, align 4, !tbaa !5
  br label %42, !llvm.loop !9

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

69:                                               ; preds = %134, %68
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %69
  %75 = load i32, ptr %9, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %76
  %78 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #8
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %10, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %81
  %83 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #8
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %11, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  %85 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %10, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8
  %87 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %11, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %86, ptr %88)
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %93
  %95 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #8
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %14, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %98
  %100 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %99) #8
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %15, i32 0, i32 0
  store ptr %100, ptr %101, align 8
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %14, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %15, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8
  %106 = call ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %103, ptr %105)
  %107 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %13, i32 0, i32 0
  store ptr %106, ptr %107, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %109
  %111 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #8
  %112 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %17, i32 0, i32 0
  store ptr %111, ptr %112, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %113 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8
  %115 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8
  %117 = call ptr @_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24) %91, ptr %114, ptr %116)
  %118 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %18, i32 0, i32 0
  store ptr %117, ptr %118, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100005 x i32], ptr @degsum, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %125
  %127 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %126) #8
  %128 = add i64 %123, %127
  %129 = trunc i64 %128 to i32
  %130 = load i32, ptr %9, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100005 x i32], ptr @degsum, i64 0, i64 %132
  store i32 %129, ptr %133, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %74
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %9, align 4, !tbaa !5
  br label %69, !llvm.loop !11

137:                                              ; preds = %73
  call void @_ZN2uf4initEv(ptr noundef nonnull align 4 dereferenceable(1600080) @u)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %175, %137
  %139 = load i32, ptr %19, align 4, !tbaa !5
  %140 = load i32, ptr @m, align 4, !tbaa !5
  %141 = icmp slt i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %178

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %144 = load i32, ptr %19, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100005 x %"struct.std::pair.0"], ptr @es, i64 0, i64 %145
  %147 = getelementptr inbounds %"struct.std::pair.0", ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %"struct.std::pair", ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 4, !tbaa !12
  store i32 %149, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %150 = load i32, ptr %19, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100005 x %"struct.std::pair.0"], ptr @es, i64 0, i64 %151
  %153 = getelementptr inbounds %"struct.std::pair.0", ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %"struct.std::pair", ptr %153, i32 0, i32 1
  %155 = load i32, ptr %154, align 4, !tbaa !15
  store i32 %155, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %156 = load i32, ptr %19, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [100005 x %"struct.std::pair.0"], ptr @es, i64 0, i64 %157
  %159 = getelementptr inbounds %"struct.std::pair.0", ptr %158, i32 0, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !16
  store i32 %160, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %161 = load i32, ptr %20, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %162
  %164 = load i32, ptr %20, align 4, !tbaa !5
  %165 = load i32, ptr %22, align 4, !tbaa !5
  %166 = call noundef i32 @_Z6getposRKSt6vectorIiSaIiEEii(ptr noundef nonnull align 8 dereferenceable(24) %163, i32 noundef %164, i32 noundef %165)
  store i32 %166, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %167 = load i32, ptr %21, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %168
  %170 = load i32, ptr %21, align 4, !tbaa !5
  %171 = load i32, ptr %22, align 4, !tbaa !5
  %172 = call noundef i32 @_Z6getposRKSt6vectorIiSaIiEEii(ptr noundef nonnull align 8 dereferenceable(24) %169, i32 noundef %170, i32 noundef %171)
  store i32 %172, ptr %24, align 4, !tbaa !5
  %173 = load i32, ptr %23, align 4, !tbaa !5
  %174 = load i32, ptr %24, align 4, !tbaa !5
  call void @_ZN2uf5uniteEii(ptr noundef nonnull align 4 dereferenceable(1600080) @u, i32 noundef %173, i32 noundef %174)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %175

175:                                              ; preds = %143
  %176 = load i32, ptr %19, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %19, align 4, !tbaa !5
  br label %138, !llvm.loop !17

178:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %179 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
  call void @llvm.lifetime.start.p0(i64 48, ptr %26) #8
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %26) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %296, %178
  %181 = load i32, ptr %27, align 4, !tbaa !5
  %182 = load i32, ptr %25, align 4, !tbaa !5
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  store i32 11, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %301

185:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %186 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %29, ptr noundef %30)
          to label %187 unwind label %202

187:                                              ; preds = %185
  %188 = load i32, ptr %29, align 4, !tbaa !5
  %189 = add nsw i32 %188, -1
  store i32 %189, ptr %29, align 4, !tbaa !5
  %190 = load i32, ptr %30, align 4, !tbaa !5
  %191 = add nsw i32 %190, -1
  store i32 %191, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  store i32 0, ptr %33, align 4, !tbaa !5
  %192 = load i32, ptr %29, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %193
  %195 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %194) #8
  %196 = load i32, ptr %30, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %197
  %199 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %198) #8
  %200 = icmp ugt i64 %195, %199
  br i1 %200, label %201, label %206

201:                                              ; preds = %187
  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) %29, ptr noundef nonnull align 4 dereferenceable(4) %30) #8
  br label %206

202:                                              ; preds = %185
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %31, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %32, align 4
  br label %300

206:                                              ; preds = %201, %187
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %207 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %208 unwind label %216

208:                                              ; preds = %206
  store i64 %207, ptr %34, align 4
  %209 = invoke noundef i64 @_ZNKSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef nonnull align 4 dereferenceable(8) %34)
          to label %210 unwind label %216

210:                                              ; preds = %208
  %211 = icmp ne i64 %209, 0
  br i1 %211, label %212, label %220

212:                                              ; preds = %210
  %213 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef nonnull align 4 dereferenceable(8) %34)
          to label %214 unwind label %216

214:                                              ; preds = %212
  %215 = load i32, ptr %213, align 4, !tbaa !5
  store i32 %215, ptr %33, align 4, !tbaa !5
  br label %292

216:                                              ; preds = %292, %288, %212, %208, %206
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %31, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %32, align 4
  br label %299

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

221:                                              ; preds = %284, %220
  %222 = load i32, ptr %35, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = load i32, ptr %29, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %225
  %227 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %226) #8
  %228 = icmp ult i64 %223, %227
  br i1 %228, label %230, label %229

229:                                              ; preds = %221
  store i32 14, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %288

230:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %231 = load i32, ptr %29, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %232
  %234 = load i32, ptr %35, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %233, i64 noundef %235) #8
  %237 = load i32, ptr %236, align 4, !tbaa !5
  store i32 %237, ptr %36, align 4, !tbaa !5
  %238 = load i32, ptr %30, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %239
  %241 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %240) #8
  %242 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %37, i32 0, i32 0
  store ptr %241, ptr %242, align 8
  %243 = load i32, ptr %30, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %244
  %246 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %245) #8
  %247 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %38, i32 0, i32 0
  store ptr %246, ptr %247, align 8
  %248 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %37, i32 0, i32 0
  %249 = load ptr, ptr %248, align 8
  %250 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.2", ptr %38, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8
  %252 = invoke noundef zeroext i1 @_ZSt13binary_searchIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEbT_S7_RKT0_(ptr %249, ptr %251, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %253 unwind label %274

253:                                              ; preds = %230
  br i1 %252, label %254, label %283

254:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %255 = load i32, ptr %30, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %256
  %258 = load i32, ptr %30, align 4, !tbaa !5
  %259 = load i32, ptr %36, align 4, !tbaa !5
  %260 = invoke noundef i32 @_Z6getposRKSt6vectorIiSaIiEEii(ptr noundef nonnull align 8 dereferenceable(24) %257, i32 noundef %258, i32 noundef %259)
          to label %261 unwind label %278

261:                                              ; preds = %254
  store i32 %260, ptr %39, align 4, !tbaa !5
  %262 = load i32, ptr %39, align 4, !tbaa !5
  %263 = load i32, ptr %29, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [100005 x i32], ptr @degsum, i64 0, i64 %264
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = load i32, ptr %35, align 4, !tbaa !5
  %268 = add nsw i32 %266, %267
  %269 = invoke noundef zeroext i1 @_ZN2uf4sameEii(ptr noundef nonnull align 4 dereferenceable(1600080) @u, i32 noundef %262, i32 noundef %268)
          to label %270 unwind label %278

270:                                              ; preds = %261
  br i1 %269, label %271, label %282

271:                                              ; preds = %270
  %272 = load i32, ptr %33, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %33, align 4, !tbaa !5
  br label %282

274:                                              ; preds = %230
  %275 = landingpad { ptr, i32 }
          cleanup
  %276 = extractvalue { ptr, i32 } %275, 0
  store ptr %276, ptr %31, align 8
  %277 = extractvalue { ptr, i32 } %275, 1
  store i32 %277, ptr %32, align 4
  br label %287

278:                                              ; preds = %261, %254
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %31, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %287

282:                                              ; preds = %271, %270
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %283

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

284:                                              ; preds = %283
  %285 = load i32, ptr %35, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %35, align 4, !tbaa !5
  br label %221, !llvm.loop !18

287:                                              ; preds = %278, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %299

288:                                              ; preds = %229
  %289 = load i32, ptr %33, align 4, !tbaa !5
  %290 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef nonnull align 4 dereferenceable(8) %34)
          to label %291 unwind label %216

291:                                              ; preds = %288
  store i32 %289, ptr %290, align 4, !tbaa !5
  br label %292

292:                                              ; preds = %291, %214
  %293 = load i32, ptr %33, align 4, !tbaa !5
  %294 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %293)
          to label %295 unwind label %216

295:                                              ; preds = %292
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %296

296:                                              ; preds = %295
  %297 = load i32, ptr %27, align 4, !tbaa !5
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %27, align 4, !tbaa !5
  br label %180, !llvm.loop !19

299:                                              ; preds = %287, %216
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %300

300:                                              ; preds = %299, %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %26) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %303

301:                                              ; preds = %184
  store i32 0, ptr %1, align 4
  store i32 1, ptr %28, align 4
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %26) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  %302 = load i32, ptr %1, align 4
  ret i32 %302

303:                                              ; preds = %300
  %304 = load ptr, ptr %31, align 8
  %305 = load i32, ptr %32, align 4
  %306 = insertvalue { ptr, i32 } poison, ptr %304, 0
  %307 = insertvalue { ptr, i32 } %306, i32 %305, 1
  resume { ptr, i32 } %307
}

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

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 uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairISt4pairIiiERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #0

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2uf4initEv(ptr noundef nonnull align 4 dereferenceable(1600080)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2uf5uniteEii(ptr noundef nonnull align 4 dereferenceable(1600080), i32 noundef, i32 noundef) #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2uf4sameEii(ptr noundef nonnull align 4 dereferenceable(1600080), i32 noundef, i32 noundef) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIS_IiiEiE", !14, i64 0, !6, i64 8}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!13, !6, i64 4}
!16 = !{!13, !6, i64 8}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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"

%struct.uf = type { [200010 x i32], [200010 x i32] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.0" = type { %"struct.std::pair", i32 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.2" = type { ptr }
%"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 }

@u = external dso_local global %struct.uf, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@adjcol = external dso_local global [100005 x %"class.std::vector"], align 16
@es = external dso_local global [100005 x %"struct.std::pair.0"], align 16
@degsum = external dso_local local_unnamed_addr global [100005 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair.0", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.2", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.2", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::map", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i32, align 4
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %18 = load i32, ptr @m, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %.preheader59

.lr.ph:                                           ; preds = %0
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  br label %22

.preheader59:                                     ; preds = %22, %0
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph64, label %._crit_edge

22:                                               ; preds = %.lr.ph, %22
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %22 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = add nsw i32 %24, -1
  store i32 %25, ptr %1, align 4, !tbaa !5
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %25 to i64
  %29 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %28
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %31
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %33 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %33, ptr %5, align 8
  %34 = call { i64, i32 } @_ZSt9make_pairISt4pairIiiERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %.fca.0.extract = extractvalue { i64, i32 } %34, 0
  %.fca.1.extract = extractvalue { i64, i32 } %34, 1
  store i64 %.fca.0.extract, ptr %4, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %35 = getelementptr inbounds [100005 x %"struct.std::pair.0"], ptr @es, i64 0, i64 %indvars.iv
  %36 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt4pairIS_IiiEiEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull align 4 dereferenceable(12) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = load i32, ptr @m, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = icmp slt i64 %indvars.iv.next, %38
  br i1 %39, label %22, label %.preheader59, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph64, %.preheader59
  call void @_ZN2uf4initEv(ptr noundef nonnull align 4 dereferenceable(1600080) @u)
  %40 = load i32, ptr @m, align 4, !tbaa !5
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph67, label %._crit_edge68

.lr.ph64:                                         ; preds = %.preheader59, %.lr.ph64
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph64 ], [ 0, %.preheader59 ]
  %42 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %indvars.iv79
  %43 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #8
  %44 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %43, ptr %44)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %45 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #8
  %46 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #8
  %47 = call ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %45, ptr %46)
  store ptr %47, ptr %7, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %48 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #8
  store ptr %48, ptr %9, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %49 = load ptr, ptr %6, align 8
  %50 = load ptr, ptr %8, align 8
  %51 = call ptr @_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr %49, ptr %50)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %52 = getelementptr inbounds [100005 x i32], ptr @degsum, i64 0, i64 %indvars.iv79
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #8
  %55 = trunc i64 %54 to i32
  %56 = add i32 %53, %55
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %57 = getelementptr inbounds [100005 x i32], ptr @degsum, i64 0, i64 %indvars.iv.next80
  store i32 %56, ptr %57, align 4, !tbaa !5
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next80, %59
  br i1 %60, label %.lr.ph64, label %._crit_edge, !llvm.loop !11

._crit_edge68:                                    ; preds = %.lr.ph67, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #8
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #8
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %.lr.ph75, label %._crit_edge76

.lr.ph67:                                         ; preds = %._crit_edge, %.lr.ph67
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %.lr.ph67 ], [ 0, %._crit_edge ]
  %64 = getelementptr inbounds [100005 x %"struct.std::pair.0"], ptr @es, i64 0, i64 %indvars.iv82
  %65 = load i32, ptr %64, align 4, !tbaa !12
  %66 = getelementptr inbounds i8, ptr %64, i64 4
  %67 = load i32, ptr %66, align 4, !tbaa !15
  %68 = getelementptr inbounds i8, ptr %64, i64 8
  %69 = load i32, ptr %68, align 4, !tbaa !16
  %70 = sext i32 %65 to i64
  %71 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %70
  %72 = call noundef i32 @_Z6getposRKSt6vectorIiSaIiEEii(ptr noundef nonnull align 8 dereferenceable(24) %71, i32 noundef %65, i32 noundef %69)
  %73 = sext i32 %67 to i64
  %74 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %73
  %75 = call noundef i32 @_Z6getposRKSt6vectorIiSaIiEEii(ptr noundef nonnull align 8 dereferenceable(24) %74, i32 noundef %67, i32 noundef %69)
  call void @_ZN2uf5uniteEii(ptr noundef nonnull align 4 dereferenceable(1600080) @u, i32 noundef %72, i32 noundef %75)
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %76 = load i32, ptr @m, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = icmp slt i64 %indvars.iv.next83, %77
  br i1 %78, label %.lr.ph67, label %._crit_edge68, !llvm.loop !17

._crit_edge76:                                    ; preds = %152, %._crit_edge68
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  ret i32 0

.lr.ph75:                                         ; preds = %._crit_edge68, %152
  %.05373 = phi i32 [ %154, %152 ], [ 0, %._crit_edge68 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %79 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = add nsw i32 %80, -1
  store i32 %81, ptr %12, align 4, !tbaa !5
  %82 = load i32, ptr %13, align 4, !tbaa !5
  %83 = add nsw i32 %82, -1
  store i32 %83, ptr %13, align 4, !tbaa !5
  %84 = sext i32 %81 to i64
  %85 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %84
  %86 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %85) #8
  %87 = load i32, ptr %13, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %88
  %90 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #8
  %91 = icmp ugt i64 %86, %90
  br i1 %91, label %92, label %93

92:                                               ; preds = %.lr.ph75
  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) %12, ptr noundef nonnull align 4 dereferenceable(4) %13) #8
  br label %93

93:                                               ; preds = %92, %.lr.ph75
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %94 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %95 unwind label %106

95:                                               ; preds = %93
  store i64 %94, ptr %14, align 8
  %96 = invoke noundef i64 @_ZNKSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %97 unwind label %106

97:                                               ; preds = %95
  %.not = icmp eq i64 %96, 0
  br i1 %.not, label %.preheader, label %102

.preheader:                                       ; preds = %97
  %98 = load i32, ptr %12, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %99
  %101 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %100) #8
  %.not77 = icmp eq i64 %101, 0
  br i1 %.not77, label %._crit_edge72, label %.lr.ph71

102:                                              ; preds = %97
  %103 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %104 unwind label %106

104:                                              ; preds = %102
  %105 = load i32, ptr %103, align 4, !tbaa !5
  br label %152

106:                                              ; preds = %._crit_edge72, %102, %95, %93
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %157

._crit_edge72:                                    ; preds = %144, %.preheader
  %.048.lcssa = phi i32 [ 0, %.preheader ], [ %.2, %144 ]
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %151 unwind label %106

.lr.ph71:                                         ; preds = %.preheader, %144
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %144 ], [ 0, %.preheader ]
  %.04869 = phi i32 [ %.2, %144 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  %109 = load i32, ptr %12, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %110
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %indvars.iv85) #8
  %113 = load i32, ptr %112, align 4, !tbaa !5
  store i32 %113, ptr %15, align 4, !tbaa !5
  %114 = load i32, ptr %13, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %115
  %117 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %116) #8
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %119
  %121 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %120) #8
  %122 = invoke noundef zeroext i1 @_ZSt13binary_searchIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEbT_S7_RKT0_(ptr %117, ptr %121, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %123 unwind label %140

123:                                              ; preds = %.lr.ph71
  br i1 %122, label %124, label %144

124:                                              ; preds = %123
  %125 = load i32, ptr %13, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %126
  %128 = load i32, ptr %15, align 4, !tbaa !5
  %129 = invoke noundef i32 @_Z6getposRKSt6vectorIiSaIiEEii(ptr noundef nonnull align 8 dereferenceable(24) %127, i32 noundef %125, i32 noundef %128)
          to label %130 unwind label %142

130:                                              ; preds = %124
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100005 x i32], ptr @degsum, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = trunc nuw nsw i64 %indvars.iv85 to i32
  %136 = add nsw i32 %134, %135
  %137 = invoke noundef zeroext i1 @_ZN2uf4sameEii(ptr noundef nonnull align 4 dereferenceable(1600080) @u, i32 noundef %129, i32 noundef %136)
          to label %138 unwind label %142

138:                                              ; preds = %130
  %139 = zext i1 %137 to i32
  %spec.select = add nsw i32 %.04869, %139
  br label %144

140:                                              ; preds = %.lr.ph71
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %150

142:                                              ; preds = %130, %124
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %150

144:                                              ; preds = %138, %123
  %.2 = phi i32 [ %spec.select, %138 ], [ %.04869, %123 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %145 = load i32, ptr %12, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @adjcol, i64 0, i64 %146
  %148 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %147) #8
  %149 = icmp ugt i64 %148, %indvars.iv.next86
  br i1 %149, label %.lr.ph71, label %._crit_edge72, !llvm.loop !18

150:                                              ; preds = %142, %140
  %.pn = phi { ptr, i32 } [ %143, %142 ], [ %141, %140 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %157

151:                                              ; preds = %._crit_edge72
  store i32 %.048.lcssa, ptr %108, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %151, %104
  %.3 = phi i32 [ %105, %104 ], [ %.048.lcssa, %151 ]
  %153 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  %154 = add nuw nsw i32 %.05373, 1
  %155 = load i32, ptr %10, align 4, !tbaa !5
  %156 = icmp slt i32 %154, %155
  br i1 %156, label %.lr.ph75, label %._crit_edge76, !llvm.loop !19

157:                                              ; preds = %150, %106
  %.pn57 = phi { ptr, i32 } [ %107, %106 ], [ %.pn, %150 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  resume { ptr, i32 } %.pn57
}

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2uf4initEv(ptr noundef nonnull align 4 dereferenceable(1600080)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2uf5uniteEii(ptr noundef nonnull align 4 dereferenceable(1600080), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2uf4sameEii(ptr noundef nonnull align 4 dereferenceable(1600080), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

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

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

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


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