; LLVM IR from eyangch/competitive-programming :: FacebookHackercup/2022/round2/b (b)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::multiset" = type { %"class.std::_Rb_tree.0" }
%"class.std::multimap" = type { %"class.std::_Rb_tree" }
%"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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair.10" = type { i64, i64 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%struct.edge = type { i64, i64, i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@A = external dso_local global [1000000 x i64], align 16
@B = external dso_local global [1000000 x i64], align 16
@X = external dso_local global [1000000 x i64], align 16
@Y = external dso_local global [1000000 x i64], align 16
@rc1 = external dso_local global [2000000 x i64], align 16
@indeg = external dso_local global [2000010 x i64], align 16
@cc1 = external dso_local global %"class.std::map", align 8
@cc2 = external dso_local global %"class.std::map", align 8
@s1 = external dso_local global %"class.std::set", align 8
@s2 = external dso_local global %"class.std::set", align 8
@G = external dso_local global [2000000 x %"class.std::vector"], align 16
@F = external dso_local global [2000000 x %"class.std::multiset"], align 16
@H2 = external dso_local global [2000000 x %"class.std::multimap"], align 16
@H = external dso_local global [2000000 x %"class.std::multimap"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"class.std::multiset", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::queue", align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca %"struct.std::pair.10", align 8
  %32 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %33 = alloca %struct.edge, align 8
  %34 = alloca i64, align 8
  %35 = alloca %"class.std::multiset", align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %39 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %40 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %41 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %42 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %43 = alloca ptr, align 8
  %44 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %45 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %46 = alloca i64, align 8
  %47 = alloca i64, align 8
  %48 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %49 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %50 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %51 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %52 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %53 = alloca i64, align 8
  %54 = alloca ptr, align 8
  %55 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %56 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %57 = alloca i64, align 8
  %58 = alloca i64, align 8
  %59 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %60 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %61 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %62 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %63 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %64 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %65 = alloca ptr, align 8
  %66 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %67 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %68 = alloca i64, align 8
  %69 = alloca i64, align 8
  %70 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %71 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %72 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %73 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %74 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %75 = alloca ptr, align 8
  %76 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %77 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %78 = alloca %struct.edge, align 8
  %79 = alloca i64, align 8
  %80 = alloca i64, align 8
  %81 = alloca i64, align 8
  %82 = alloca i64, align 8
  %83 = alloca %"struct.std::pair.10", align 8
  %84 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %85 = alloca i64, align 8
  %86 = alloca ptr, align 8
  %87 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %88 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %89 = alloca i64, align 8
  %90 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %91 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %92 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %93 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %94 = alloca i64, align 8
  %95 = alloca ptr, align 8
  %96 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %97 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %98 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %99 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %100 = getelementptr i8, ptr %99, i64 -24
  %101 = load i64, ptr %100, align 8
  %102 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %101
  %103 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %102, ptr noundef null)
  %104 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  store i64 1, ptr %2, align 8, !tbaa !8
  br label %106

106:                                              ; preds = %676, %0
  %107 = load i64, ptr %2, align 8, !tbaa !8
  %108 = load i64, ptr @T, align 8, !tbaa !8
  %109 = icmp sle i64 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %686

111:                                              ; preds = %106
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @cc1) #8
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @cc2) #8
  call void @_ZNSt3setIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #8
  call void @_ZNSt3setIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @s2) #8
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %113 = load i64, ptr %2, align 8, !tbaa !8
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %112, i64 noundef %113)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef @.str.12)
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %116, ptr noundef nonnull align 8 dereferenceable(8) @K)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  store i64 0, ptr %4, align 8, !tbaa !8
  br label %118

118:                                              ; preds = %166, %111
  %119 = load i64, ptr %4, align 8, !tbaa !8
  %120 = load i64, ptr @N, align 8, !tbaa !8
  %121 = icmp slt i64 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %169

123:                                              ; preds = %118
  %124 = load i64, ptr %4, align 8, !tbaa !8
  %125 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %124
  call void @_ZNSt8multisetIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %125) #8
  %126 = load i64, ptr %4, align 8, !tbaa !8
  %127 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %126
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %127)
  %129 = load i64, ptr %4, align 8, !tbaa !8
  %130 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %129
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %128, ptr noundef nonnull align 8 dereferenceable(8) %130)
  %132 = load i64, ptr %4, align 8, !tbaa !8
  %133 = getelementptr inbounds [1000000 x i64], ptr @X, i64 0, i64 %132
  %134 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %131, ptr noundef nonnull align 8 dereferenceable(8) %133)
  %135 = load i64, ptr %4, align 8, !tbaa !8
  %136 = getelementptr inbounds [1000000 x i64], ptr @Y, i64 0, i64 %135
  %137 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %134, ptr noundef nonnull align 8 dereferenceable(8) %136)
  %138 = load i64, ptr %4, align 8, !tbaa !8
  %139 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %138
  %140 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s1, ptr noundef nonnull align 8 dereferenceable(8) %139)
  %141 = getelementptr inbounds { ptr, i8 }, ptr %5, i32 0, i32 0
  %142 = extractvalue { ptr, i8 } %140, 0
  store ptr %142, ptr %141, align 8
  %143 = getelementptr inbounds { ptr, i8 }, ptr %5, i32 0, i32 1
  %144 = extractvalue { ptr, i8 } %140, 1
  store i8 %144, ptr %143, align 8
  %145 = load i64, ptr %4, align 8, !tbaa !8
  %146 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %145
  %147 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s1, ptr noundef nonnull align 8 dereferenceable(8) %146)
  %148 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 0
  %149 = extractvalue { ptr, i8 } %147, 0
  store ptr %149, ptr %148, align 8
  %150 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 1
  %151 = extractvalue { ptr, i8 } %147, 1
  store i8 %151, ptr %150, align 8
  %152 = load i64, ptr %4, align 8, !tbaa !8
  %153 = getelementptr inbounds [1000000 x i64], ptr @X, i64 0, i64 %152
  %154 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s2, ptr noundef nonnull align 8 dereferenceable(8) %153)
  %155 = getelementptr inbounds { ptr, i8 }, ptr %7, i32 0, i32 0
  %156 = extractvalue { ptr, i8 } %154, 0
  store ptr %156, ptr %155, align 8
  %157 = getelementptr inbounds { ptr, i8 }, ptr %7, i32 0, i32 1
  %158 = extractvalue { ptr, i8 } %154, 1
  store i8 %158, ptr %157, align 8
  %159 = load i64, ptr %4, align 8, !tbaa !8
  %160 = getelementptr inbounds [1000000 x i64], ptr @Y, i64 0, i64 %159
  %161 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s2, ptr noundef nonnull align 8 dereferenceable(8) %160)
  %162 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 0
  %163 = extractvalue { ptr, i8 } %161, 0
  store ptr %163, ptr %162, align 8
  %164 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 1
  %165 = extractvalue { ptr, i8 } %161, 1
  store i8 %165, ptr %164, align 8
  br label %166

166:                                              ; preds = %123
  %167 = load i64, ptr %4, align 8, !tbaa !8
  %168 = add nsw i64 %167, 1
  store i64 %168, ptr %4, align 8, !tbaa !8
  br label %118, !llvm.loop !11

169:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %170 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #8
  %171 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %9, i32 0, i32 0
  store ptr %170, ptr %171, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %172 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @s2) #8
  %173 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %10, i32 0, i32 0
  store ptr %172, ptr %173, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %174

174:                                              ; preds = %197, %169
  %175 = load i64, ptr %11, align 8, !tbaa !8
  %176 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #8
  %177 = icmp ult i64 %175, %176
  br i1 %177, label %179, label %178

178:                                              ; preds = %174
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %200

179:                                              ; preds = %174
  %180 = load i64, ptr %11, align 8, !tbaa !8
  %181 = getelementptr inbounds [2000000 x %"class.std::vector"], ptr @G, i64 0, i64 %180
  call void @_ZNSt6vectorI4edgeSaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %181) #8
  %182 = load i64, ptr %11, align 8, !tbaa !8
  %183 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H, i64 0, i64 %182
  call void @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %183) #8
  %184 = load i64, ptr %11, align 8, !tbaa !8
  %185 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %184
  call void @_ZNSt8multisetIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %185) #8
  %186 = load i64, ptr %11, align 8, !tbaa !8
  %187 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H2, i64 0, i64 %186
  call void @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %187) #8
  %188 = load i64, ptr %11, align 8, !tbaa !8
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @cc1, ptr noundef nonnull align 8 dereferenceable(8) %189)
  store i64 %188, ptr %190, align 8, !tbaa !8
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %192 = load i64, ptr %191, align 8, !tbaa !8
  %193 = load i64, ptr %11, align 8, !tbaa !8
  %194 = getelementptr inbounds [2000000 x i64], ptr @rc1, i64 0, i64 %193
  store i64 %192, ptr %194, align 8, !tbaa !8
  %195 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0) #8
  %196 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %195, ptr %196, align 8
  br label %197

197:                                              ; preds = %179
  %198 = load i64, ptr %11, align 8, !tbaa !8
  %199 = add nsw i64 %198, 1
  store i64 %199, ptr %11, align 8, !tbaa !8
  br label %174, !llvm.loop !13

200:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store i64 0, ptr %14, align 8, !tbaa !8
  br label %201

201:                                              ; preds = %210, %200
  %202 = load i64, ptr %14, align 8, !tbaa !8
  %203 = load i64, ptr @K, align 8, !tbaa !8
  %204 = icmp slt i64 %202, %203
  br i1 %204, label %206, label %205

205:                                              ; preds = %201
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %217

206:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 0, ptr %15, align 8, !tbaa !8
  %207 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %208 unwind label %213

208:                                              ; preds = %206
  %209 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %207, ptr %209, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %210

210:                                              ; preds = %208
  %211 = load i64, ptr %14, align 8, !tbaa !8
  %212 = add nsw i64 %211, 1
  store i64 %212, ptr %14, align 8, !tbaa !8
  br label %201, !llvm.loop !14

213:                                              ; preds = %206
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %16, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %685

217:                                              ; preds = %205
  %218 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #8
  %219 = getelementptr inbounds i64, ptr @indeg, i64 %218
  %220 = getelementptr inbounds i64, ptr %219, i64 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !15
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @indeg, ptr noundef %220, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %221 unwind label %228

221:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr %20) #8
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %20)
          to label %222 unwind label %232

222:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store i64 0, ptr %21, align 8, !tbaa !8
  br label %223

223:                                              ; preds = %311, %222
  %224 = load i64, ptr %21, align 8, !tbaa !8
  %225 = load i64, ptr @N, align 8, !tbaa !8
  %226 = icmp slt i64 %224, %225
  br i1 %226, label %236, label %227

227:                                              ; preds = %223
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %325

228:                                              ; preds = %217
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %16, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %685

232:                                              ; preds = %221
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %16, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %17, align 4
  br label %684

236:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %237 = load i64, ptr %21, align 8, !tbaa !8
  %238 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %237
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @cc1, ptr noundef nonnull align 8 dereferenceable(8) %238)
          to label %240 unwind label %262

240:                                              ; preds = %236
  %241 = load i64, ptr %239, align 8, !tbaa !8
  store i64 %241, ptr %22, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %242 = load i64, ptr %21, align 8, !tbaa !8
  %243 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %242
  %244 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @cc1, ptr noundef nonnull align 8 dereferenceable(8) %243)
          to label %245 unwind label %266

245:                                              ; preds = %240
  %246 = load i64, ptr %244, align 8, !tbaa !8
  store i64 %246, ptr %23, align 8, !tbaa !8
  %247 = load i64, ptr %23, align 8, !tbaa !8
  %248 = getelementptr inbounds [2000010 x i64], ptr @indeg, i64 0, i64 %247
  %249 = load i64, ptr %248, align 8, !tbaa !8
  %250 = add nsw i64 %249, 1
  store i64 %250, ptr %248, align 8, !tbaa !8
  %251 = load i64, ptr %21, align 8, !tbaa !8
  %252 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %251
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store i64 0, ptr %24, align 8, !tbaa !8
  %253 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %252, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %254 unwind label %270

254:                                              ; preds = %245
  %255 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %25, i32 0, i32 0
  store ptr %253, ptr %255, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  store i64 0, ptr %26, align 8, !tbaa !8
  br label %256

256:                                              ; preds = %280, %254
  %257 = load i64, ptr %26, align 8, !tbaa !8
  %258 = load i64, ptr @K, align 8, !tbaa !8
  %259 = sub nsw i64 %258, 1
  %260 = icmp slt i64 %257, %259
  br i1 %260, label %274, label %261

261:                                              ; preds = %256
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %287

262:                                              ; preds = %236
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %16, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %17, align 4
  br label %324

266:                                              ; preds = %240
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %16, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %17, align 4
  br label %323

270:                                              ; preds = %245
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %16, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %323

274:                                              ; preds = %256
  %275 = load i64, ptr %21, align 8, !tbaa !8
  %276 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  store i64 -999999999999999, ptr %27, align 8, !tbaa !8
  %277 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %276, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %278 unwind label %283

278:                                              ; preds = %274
  %279 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %28, i32 0, i32 0
  store ptr %277, ptr %279, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %280

280:                                              ; preds = %278
  %281 = load i64, ptr %26, align 8, !tbaa !8
  %282 = add nsw i64 %281, 1
  store i64 %282, ptr %26, align 8, !tbaa !8
  br label %256, !llvm.loop !17

283:                                              ; preds = %274
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %16, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %323

287:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %288 = load i64, ptr %21, align 8, !tbaa !8
  %289 = getelementptr inbounds [1000000 x i64], ptr @X, i64 0, i64 %288
  %290 = load i64, ptr %289, align 8, !tbaa !8
  store i64 %290, ptr %29, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %291 = load i64, ptr %21, align 8, !tbaa !8
  %292 = getelementptr inbounds [1000000 x i64], ptr @Y, i64 0, i64 %291
  %293 = load i64, ptr %292, align 8, !tbaa !8
  store i64 %293, ptr %30, align 8, !tbaa !8
  %294 = load i64, ptr %22, align 8, !tbaa !8
  %295 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H2, i64 0, i64 %294
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #8
  invoke void @_ZNSt4pairIKxxEC2IRxS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %296 unwind label %314

296:                                              ; preds = %287
  %297 = invoke ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE6insertEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %295, ptr noundef nonnull align 8 dereferenceable(16) %31)
          to label %298 unwind label %314

298:                                              ; preds = %296
  %299 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %32, i32 0, i32 0
  store ptr %297, ptr %299, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  %300 = load i64, ptr %22, align 8, !tbaa !8
  %301 = getelementptr inbounds [2000000 x %"class.std::vector"], ptr @G, i64 0, i64 %300
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #8
  %302 = getelementptr inbounds %struct.edge, ptr %33, i32 0, i32 0
  %303 = load i64, ptr %23, align 8, !tbaa !8
  store i64 %303, ptr %302, align 8, !tbaa !18
  %304 = getelementptr inbounds %struct.edge, ptr %33, i32 0, i32 1
  %305 = load i64, ptr %29, align 8, !tbaa !8
  store i64 %305, ptr %304, align 8, !tbaa !20
  %306 = getelementptr inbounds %struct.edge, ptr %33, i32 0, i32 2
  %307 = load i64, ptr %30, align 8, !tbaa !8
  store i64 %307, ptr %306, align 8, !tbaa !21
  %308 = getelementptr inbounds %struct.edge, ptr %33, i32 0, i32 3
  %309 = load i64, ptr %21, align 8, !tbaa !8
  store i64 %309, ptr %308, align 8, !tbaa !22
  invoke void @_ZNSt6vectorI4edgeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %301, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %310 unwind label %318

310:                                              ; preds = %298
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %311

311:                                              ; preds = %310
  %312 = load i64, ptr %21, align 8, !tbaa !8
  %313 = add nsw i64 %312, 1
  store i64 %313, ptr %21, align 8, !tbaa !8
  br label %223, !llvm.loop !23

314:                                              ; preds = %296, %287
  %315 = landingpad { ptr, i32 }
          cleanup
  %316 = extractvalue { ptr, i32 } %315, 0
  store ptr %316, ptr %16, align 8
  %317 = extractvalue { ptr, i32 } %315, 1
  store i32 %317, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  br label %322

318:                                              ; preds = %298
  %319 = landingpad { ptr, i32 }
          cleanup
  %320 = extractvalue { ptr, i32 } %319, 0
  store ptr %320, ptr %16, align 8
  %321 = extractvalue { ptr, i32 } %319, 1
  store i32 %321, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #8
  br label %322

322:                                              ; preds = %318, %314
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %323

323:                                              ; preds = %322, %283, %270, %266
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %324

324:                                              ; preds = %323, %262
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %683

325:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  store i64 0, ptr %34, align 8, !tbaa !8
  br label %326

326:                                              ; preds = %597, %325
  %327 = load i64, ptr %34, align 8, !tbaa !8
  %328 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #8
  %329 = icmp ult i64 %327, %328
  br i1 %329, label %331, label %330

330:                                              ; preds = %326
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %602

331:                                              ; preds = %326
  call void @llvm.lifetime.start.p0(i64 48, ptr %35) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %35) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  store i64 0, ptr %36, align 8, !tbaa !8
  br label %332

332:                                              ; preds = %341, %331
  %333 = load i64, ptr %36, align 8, !tbaa !8
  %334 = load i64, ptr @K, align 8, !tbaa !8
  %335 = icmp slt i64 %333, %334
  br i1 %335, label %337, label %336

336:                                              ; preds = %332
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %348

337:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  store i64 -99999999999, ptr %37, align 8, !tbaa !8
  %338 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %339 unwind label %344

339:                                              ; preds = %337
  %340 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %38, i32 0, i32 0
  store ptr %338, ptr %340, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %341

341:                                              ; preds = %339
  %342 = load i64, ptr %36, align 8, !tbaa !8
  %343 = add nsw i64 %342, 1
  store i64 %343, ptr %36, align 8, !tbaa !8
  br label %332, !llvm.loop !24

344:                                              ; preds = %337
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %16, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %601

348:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %349 = load i64, ptr %34, align 8, !tbaa !8
  %350 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H2, i64 0, i64 %349
  %351 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %350) #8
  %352 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %39, i32 0, i32 0
  store ptr %351, ptr %352, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %353 = load i64, ptr %34, align 8, !tbaa !8
  %354 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H, i64 0, i64 %353
  %355 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %354) #8
  %356 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %40, i32 0, i32 0
  store ptr %355, ptr %356, align 8
  br label %357

357:                                              ; preds = %490, %348
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  %358 = load i64, ptr %34, align 8, !tbaa !8
  %359 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H, i64 0, i64 %358
  %360 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %359) #8
  %361 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %41, i32 0, i32 0
  store ptr %360, ptr %361, align 8
  %362 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br i1 %362, label %364, label %363

363:                                              ; preds = %357
  store i32 26, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %494

364:                                              ; preds = %357
  br label %365

365:                                              ; preds = %439, %364
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %366 = load i64, ptr %34, align 8, !tbaa !8
  %367 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H2, i64 0, i64 %366
  %368 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %367) #8
  %369 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %42, i32 0, i32 0
  store ptr %368, ptr %369, align 8
  %370 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  br i1 %370, label %371, label %379

371:                                              ; preds = %365
  %372 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %373 = getelementptr inbounds %"struct.std::pair.10", ptr %372, i32 0, i32 0
  %374 = load i64, ptr %373, align 8, !tbaa !25
  %375 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  %376 = getelementptr inbounds %"struct.std::pair.10", ptr %375, i32 0, i32 0
  %377 = load i64, ptr %376, align 8, !tbaa !25
  %378 = icmp sle i64 %374, %377
  br label %379

379:                                              ; preds = %371, %365
  %380 = phi i1 [ false, %365 ], [ %378, %371 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  br i1 %380, label %381, label %442

381:                                              ; preds = %379
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  store ptr %35, ptr %43, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %382 = load ptr, ptr %43, align 8, !tbaa !27
  %383 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %382) #8
  %384 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %44, i32 0, i32 0
  store ptr %383, ptr %384, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %385 = load ptr, ptr %43, align 8, !tbaa !27
  %386 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %385) #8
  %387 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %45, i32 0, i32 0
  store ptr %386, ptr %387, align 8
  br label %388

388:                                              ; preds = %437, %381
  %389 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %45) #8
  br i1 %389, label %391, label %390

390:                                              ; preds = %388
  store i32 31, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %439

391:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #8
  %392 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #8
  %393 = load i64, ptr %392, align 8, !tbaa !8
  store i64 %393, ptr %46, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  %394 = load i64, ptr %46, align 8, !tbaa !8
  %395 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %396 = getelementptr inbounds %"struct.std::pair.10", ptr %395, i32 0, i32 0
  %397 = load i64, ptr %396, align 8, !tbaa !25
  %398 = add nsw i64 %394, %397
  store i64 %398, ptr %47, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %399 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %400 = getelementptr inbounds %"struct.std::pair.10", ptr %399, i32 0, i32 1
  %401 = load i64, ptr %400, align 8, !tbaa !29
  %402 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %401
  %403 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %402) #8
  %404 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %48, i32 0, i32 0
  store ptr %403, ptr %404, align 8
  %405 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #8
  %406 = load i64, ptr %405, align 8, !tbaa !8
  %407 = load i64, ptr %47, align 8, !tbaa !8
  %408 = icmp slt i64 %406, %407
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  br i1 %408, label %409, label %436

409:                                              ; preds = %391
  %410 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %411 = getelementptr inbounds %"struct.std::pair.10", ptr %410, i32 0, i32 1
  %412 = load i64, ptr %411, align 8, !tbaa !29
  %413 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %412
  %414 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %415 = getelementptr inbounds %"struct.std::pair.10", ptr %414, i32 0, i32 1
  %416 = load i64, ptr %415, align 8, !tbaa !29
  %417 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %416
  %418 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %417) #8
  %419 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %49, i32 0, i32 0
  store ptr %418, ptr %419, align 8
  %420 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %49, i32 0, i32 0
  %421 = load ptr, ptr %420, align 8
  %422 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %413, ptr %421)
          to label %423 unwind label %432

423:                                              ; preds = %409
  %424 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %50, i32 0, i32 0
  store ptr %422, ptr %424, align 8
  %425 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %426 = getelementptr inbounds %"struct.std::pair.10", ptr %425, i32 0, i32 1
  %427 = load i64, ptr %426, align 8, !tbaa !29
  %428 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %427
  %429 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %428, ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %430 unwind label %432

430:                                              ; preds = %423
  %431 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %51, i32 0, i32 0
  store ptr %429, ptr %431, align 8
  br label %436

432:                                              ; preds = %423, %409
  %433 = landingpad { ptr, i32 }
          cleanup
  %434 = extractvalue { ptr, i32 } %433, 0
  store ptr %434, ptr %16, align 8
  %435 = extractvalue { ptr, i32 } %433, 1
  store i32 %435, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %493

436:                                              ; preds = %430, %391
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  br label %437

437:                                              ; preds = %436
  %438 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #8
  br label %388

439:                                              ; preds = %390
  %440 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef 0) #8
  %441 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %52, i32 0, i32 0
  store ptr %440, ptr %441, align 8
  br label %365, !llvm.loop !30

442:                                              ; preds = %379
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  %443 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  %444 = getelementptr inbounds %"struct.std::pair.10", ptr %443, i32 0, i32 1
  %445 = load i64, ptr %444, align 8, !tbaa !29
  store i64 %445, ptr %53, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #8
  %446 = load i64, ptr %53, align 8, !tbaa !8
  %447 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %446
  store ptr %447, ptr %54, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #8
  %448 = load ptr, ptr %54, align 8, !tbaa !27
  %449 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %448) #8
  %450 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %55, i32 0, i32 0
  store ptr %449, ptr %450, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #8
  %451 = load ptr, ptr %54, align 8, !tbaa !27
  %452 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %451) #8
  %453 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %56, i32 0, i32 0
  store ptr %452, ptr %453, align 8
  br label %454

454:                                              ; preds = %487, %442
  %455 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(8) %56) #8
  br i1 %455, label %457, label %456

456:                                              ; preds = %454
  store i32 33, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  br label %489

457:                                              ; preds = %454
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #8
  %458 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #8
  %459 = load i64, ptr %458, align 8, !tbaa !8
  store i64 %459, ptr %57, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #8
  %460 = load i64, ptr %57, align 8, !tbaa !8
  %461 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  %462 = getelementptr inbounds %"struct.std::pair.10", ptr %461, i32 0, i32 0
  %463 = load i64, ptr %462, align 8, !tbaa !25
  %464 = sub nsw i64 %460, %463
  store i64 %464, ptr %58, align 8, !tbaa !8
  %465 = load i64, ptr %58, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #8
  %466 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %35) #8
  %467 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %59, i32 0, i32 0
  store ptr %466, ptr %467, align 8
  %468 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %59) #8
  %469 = load i64, ptr %468, align 8, !tbaa !8
  %470 = icmp sgt i64 %465, %469
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  br i1 %470, label %471, label %486

471:                                              ; preds = %457
  %472 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %35) #8
  %473 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %60, i32 0, i32 0
  store ptr %472, ptr %473, align 8
  %474 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %60, i32 0, i32 0
  %475 = load ptr, ptr %474, align 8
  %476 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr %475)
          to label %477 unwind label %482

477:                                              ; preds = %471
  %478 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %61, i32 0, i32 0
  store ptr %476, ptr %478, align 8
  %479 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(8) %58)
          to label %480 unwind label %482

480:                                              ; preds = %477
  %481 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %62, i32 0, i32 0
  store ptr %479, ptr %481, align 8
  br label %486

482:                                              ; preds = %477, %471
  %483 = landingpad { ptr, i32 }
          cleanup
  %484 = extractvalue { ptr, i32 } %483, 0
  store ptr %484, ptr %16, align 8
  %485 = extractvalue { ptr, i32 } %483, 1
  store i32 %485, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  br label %493

486:                                              ; preds = %480, %457
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  br label %487

487:                                              ; preds = %486
  %488 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #8
  br label %454

489:                                              ; preds = %456
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  br label %490

490:                                              ; preds = %489
  %491 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %40, i32 noundef 0) #8
  %492 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %63, i32 0, i32 0
  store ptr %491, ptr %492, align 8
  br label %357, !llvm.loop !31

493:                                              ; preds = %482, %432
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %600

494:                                              ; preds = %363
  br label %495

495:                                              ; preds = %559, %494
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #8
  %496 = load i64, ptr %34, align 8, !tbaa !8
  %497 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H2, i64 0, i64 %496
  %498 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %497) #8
  %499 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %64, i32 0, i32 0
  store ptr %498, ptr %499, align 8
  %500 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #8
  br i1 %500, label %501, label %562

501:                                              ; preds = %495
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #8
  store ptr %35, ptr %65, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #8
  %502 = load ptr, ptr %65, align 8, !tbaa !27
  %503 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %502) #8
  %504 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %66, i32 0, i32 0
  store ptr %503, ptr %504, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #8
  %505 = load ptr, ptr %65, align 8, !tbaa !27
  %506 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %505) #8
  %507 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %67, i32 0, i32 0
  store ptr %506, ptr %507, align 8
  br label %508

508:                                              ; preds = %557, %501
  %509 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull align 8 dereferenceable(8) %67) #8
  br i1 %509, label %511, label %510

510:                                              ; preds = %508
  store i32 37, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #8
  br label %559

511:                                              ; preds = %508
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #8
  %512 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %66) #8
  %513 = load i64, ptr %512, align 8, !tbaa !8
  store i64 %513, ptr %68, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #8
  %514 = load i64, ptr %68, align 8, !tbaa !8
  %515 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %516 = getelementptr inbounds %"struct.std::pair.10", ptr %515, i32 0, i32 0
  %517 = load i64, ptr %516, align 8, !tbaa !25
  %518 = add nsw i64 %514, %517
  store i64 %518, ptr %69, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #8
  %519 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %520 = getelementptr inbounds %"struct.std::pair.10", ptr %519, i32 0, i32 1
  %521 = load i64, ptr %520, align 8, !tbaa !29
  %522 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %521
  %523 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %522) #8
  %524 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %70, i32 0, i32 0
  store ptr %523, ptr %524, align 8
  %525 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %70) #8
  %526 = load i64, ptr %525, align 8, !tbaa !8
  %527 = load i64, ptr %69, align 8, !tbaa !8
  %528 = icmp slt i64 %526, %527
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #8
  br i1 %528, label %529, label %556

529:                                              ; preds = %511
  %530 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %531 = getelementptr inbounds %"struct.std::pair.10", ptr %530, i32 0, i32 1
  %532 = load i64, ptr %531, align 8, !tbaa !29
  %533 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %532
  %534 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %533, ptr noundef nonnull align 8 dereferenceable(8) %69)
          to label %535 unwind label %552

535:                                              ; preds = %529
  %536 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %71, i32 0, i32 0
  store ptr %534, ptr %536, align 8
  %537 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %538 = getelementptr inbounds %"struct.std::pair.10", ptr %537, i32 0, i32 1
  %539 = load i64, ptr %538, align 8, !tbaa !29
  %540 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %539
  %541 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %542 = getelementptr inbounds %"struct.std::pair.10", ptr %541, i32 0, i32 1
  %543 = load i64, ptr %542, align 8, !tbaa !29
  %544 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %543
  %545 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %544) #8
  %546 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %72, i32 0, i32 0
  store ptr %545, ptr %546, align 8
  %547 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %72, i32 0, i32 0
  %548 = load ptr, ptr %547, align 8
  %549 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %540, ptr %548)
          to label %550 unwind label %552

550:                                              ; preds = %535
  %551 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %73, i32 0, i32 0
  store ptr %549, ptr %551, align 8
  br label %556

552:                                              ; preds = %535, %529
  %553 = landingpad { ptr, i32 }
          cleanup
  %554 = extractvalue { ptr, i32 } %553, 0
  store ptr %554, ptr %16, align 8
  %555 = extractvalue { ptr, i32 } %553, 1
  store i32 %555, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #8
  br label %600

556:                                              ; preds = %550, %511
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #8
  br label %557

557:                                              ; preds = %556
  %558 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %66) #8
  br label %508

559:                                              ; preds = %510
  %560 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef 0) #8
  %561 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %74, i32 0, i32 0
  store ptr %560, ptr %561, align 8
  br label %495, !llvm.loop !32

562:                                              ; preds = %495
  call void @llvm.lifetime.start.p0(i64 8, ptr %75) #8
  %563 = load i64, ptr %34, align 8, !tbaa !8
  %564 = getelementptr inbounds [2000000 x %"class.std::vector"], ptr @G, i64 0, i64 %563
  store ptr %564, ptr %75, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %76) #8
  %565 = load ptr, ptr %75, align 8, !tbaa !27
  %566 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %565) #8
  %567 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %76, i32 0, i32 0
  store ptr %566, ptr %567, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %77) #8
  %568 = load ptr, ptr %75, align 8, !tbaa !27
  %569 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %568) #8
  %570 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %77, i32 0, i32 0
  store ptr %569, ptr %570, align 8
  br label %571

571:                                              ; preds = %590, %562
  %572 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %77) #8
  br i1 %572, label %574, label %573

573:                                              ; preds = %571
  store i32 39, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #8
  br label %596

574:                                              ; preds = %571
  call void @llvm.lifetime.start.p0(i64 32, ptr %78) #8
  %575 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %76) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %78, ptr align 8 %575, i64 32, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %79) #8
  %576 = getelementptr inbounds %struct.edge, ptr %78, i32 0, i32 0
  %577 = load i64, ptr %576, align 8, !tbaa !18
  store i64 %577, ptr %79, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %80) #8
  %578 = getelementptr inbounds %struct.edge, ptr %78, i32 0, i32 1
  %579 = load i64, ptr %578, align 8, !tbaa !20
  store i64 %579, ptr %80, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %81) #8
  %580 = getelementptr inbounds %struct.edge, ptr %78, i32 0, i32 2
  %581 = load i64, ptr %580, align 8, !tbaa !21
  store i64 %581, ptr %81, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %82) #8
  %582 = getelementptr inbounds %struct.edge, ptr %78, i32 0, i32 3
  %583 = load i64, ptr %582, align 8, !tbaa !22
  store i64 %583, ptr %82, align 8, !tbaa !8
  %584 = load i64, ptr %79, align 8, !tbaa !8
  %585 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H, i64 0, i64 %584
  call void @llvm.lifetime.start.p0(i64 16, ptr %83) #8
  invoke void @_ZNSt4pairIKxxEC2IRxS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %82)
          to label %586 unwind label %592

586:                                              ; preds = %574
  %587 = invoke ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE6insertEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %585, ptr noundef nonnull align 8 dereferenceable(16) %83)
          to label %588 unwind label %592

588:                                              ; preds = %586
  %589 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %84, i32 0, i32 0
  store ptr %587, ptr %589, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %83) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %82) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %79) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %78) #8
  br label %590

590:                                              ; preds = %588
  %591 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %76) #8
  br label %571

592:                                              ; preds = %586, %574
  %593 = landingpad { ptr, i32 }
          cleanup
  %594 = extractvalue { ptr, i32 } %593, 0
  store ptr %594, ptr %16, align 8
  %595 = extractvalue { ptr, i32 } %593, 1
  store i32 %595, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %83) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %82) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %79) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %78) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #8
  br label %600

596:                                              ; preds = %573
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %35) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %35) #8
  br label %597

597:                                              ; preds = %596
  %598 = load i64, ptr %34, align 8, !tbaa !8
  %599 = add nsw i64 %598, 1
  store i64 %599, ptr %34, align 8, !tbaa !8
  br label %326, !llvm.loop !34

600:                                              ; preds = %592, %552, %493
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  br label %601

601:                                              ; preds = %600, %344
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %35) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %683

602:                                              ; preds = %330
  call void @llvm.lifetime.start.p0(i64 8, ptr %85) #8
  store i64 0, ptr %85, align 8, !tbaa !8
  br label %603

603:                                              ; preds = %648, %602
  %604 = load i64, ptr %85, align 8, !tbaa !8
  %605 = load i64, ptr @N, align 8, !tbaa !8
  %606 = icmp slt i64 %604, %605
  br i1 %606, label %608, label %607

607:                                              ; preds = %603
  store i32 41, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %85) #8
  br label %651

608:                                              ; preds = %603
  call void @llvm.lifetime.start.p0(i64 8, ptr %86) #8
  %609 = load i64, ptr %85, align 8, !tbaa !8
  %610 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %609
  store ptr %610, ptr %86, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %87) #8
  %611 = load ptr, ptr %86, align 8, !tbaa !27
  %612 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %611) #8
  %613 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %87, i32 0, i32 0
  store ptr %612, ptr %613, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %88) #8
  %614 = load ptr, ptr %86, align 8, !tbaa !27
  %615 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %614) #8
  %616 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %88, i32 0, i32 0
  store ptr %615, ptr %616, align 8
  br label %617

617:                                              ; preds = %645, %608
  %618 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull align 8 dereferenceable(8) %88) #8
  br i1 %618, label %620, label %619

619:                                              ; preds = %617
  store i32 44, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %88) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %87) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #8
  br label %647

620:                                              ; preds = %617
  call void @llvm.lifetime.start.p0(i64 8, ptr %89) #8
  %621 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %87) #8
  %622 = load i64, ptr %621, align 8, !tbaa !8
  store i64 %622, ptr %89, align 8, !tbaa !8
  %623 = load i64, ptr %89, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %90) #8
  %624 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  %625 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %90, i32 0, i32 0
  store ptr %624, ptr %625, align 8
  %626 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %90) #8
  %627 = load i64, ptr %626, align 8, !tbaa !8
  %628 = icmp sgt i64 %623, %627
  call void @llvm.lifetime.end.p0(i64 8, ptr %90) #8
  br i1 %628, label %629, label %644

629:                                              ; preds = %620
  %630 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  %631 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %91, i32 0, i32 0
  store ptr %630, ptr %631, align 8
  %632 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %91, i32 0, i32 0
  %633 = load ptr, ptr %632, align 8
  %634 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr %633)
          to label %635 unwind label %640

635:                                              ; preds = %629
  %636 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %92, i32 0, i32 0
  store ptr %634, ptr %636, align 8
  %637 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %638 unwind label %640

638:                                              ; preds = %635
  %639 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %93, i32 0, i32 0
  store ptr %637, ptr %639, align 8
  br label %644

640:                                              ; preds = %635, %629
  %641 = landingpad { ptr, i32 }
          cleanup
  %642 = extractvalue { ptr, i32 } %641, 0
  store ptr %642, ptr %16, align 8
  %643 = extractvalue { ptr, i32 } %641, 1
  store i32 %643, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %89) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %88) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %87) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %85) #8
  br label %683

644:                                              ; preds = %638, %620
  call void @llvm.lifetime.end.p0(i64 8, ptr %89) #8
  br label %645

645:                                              ; preds = %644
  %646 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %87) #8
  br label %617

647:                                              ; preds = %619
  br label %648

648:                                              ; preds = %647
  %649 = load i64, ptr %85, align 8, !tbaa !8
  %650 = add nsw i64 %649, 1
  store i64 %650, ptr %85, align 8, !tbaa !8
  br label %603, !llvm.loop !35

651:                                              ; preds = %607
  call void @llvm.lifetime.start.p0(i64 8, ptr %94) #8
  store i64 0, ptr %94, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %95) #8
  store ptr %13, ptr %95, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %96) #8
  %652 = load ptr, ptr %95, align 8, !tbaa !27
  %653 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %652) #8
  %654 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %96, i32 0, i32 0
  store ptr %653, ptr %654, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %97) #8
  %655 = load ptr, ptr %95, align 8, !tbaa !27
  %656 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %655) #8
  %657 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %97, i32 0, i32 0
  store ptr %656, ptr %657, align 8
  br label %658

658:                                              ; preds = %667, %651
  %659 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull align 8 dereferenceable(8) %97) #8
  br i1 %659, label %661, label %660

660:                                              ; preds = %658
  store i32 46, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %97) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %96) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %95) #8
  br label %669

661:                                              ; preds = %658
  call void @llvm.lifetime.start.p0(i64 8, ptr %98) #8
  %662 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %96) #8
  %663 = load i64, ptr %662, align 8, !tbaa !8
  store i64 %663, ptr %98, align 8, !tbaa !8
  %664 = load i64, ptr %98, align 8, !tbaa !8
  %665 = load i64, ptr %94, align 8, !tbaa !8
  %666 = add nsw i64 %665, %664
  store i64 %666, ptr %94, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %98) #8
  br label %667

667:                                              ; preds = %661
  %668 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %96) #8
  br label %658

669:                                              ; preds = %660
  %670 = load i64, ptr %94, align 8, !tbaa !8
  %671 = srem i64 %670, 1000000007
  %672 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %671)
          to label %673 unwind label %679

673:                                              ; preds = %669
  %674 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %672, i8 noundef signext 10)
          to label %675 unwind label %679

675:                                              ; preds = %673
  call void @llvm.lifetime.end.p0(i64 8, ptr %94) #8
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %20) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %20) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %676

676:                                              ; preds = %675
  %677 = load i64, ptr %2, align 8, !tbaa !8
  %678 = add nsw i64 %677, 1
  store i64 %678, ptr %2, align 8, !tbaa !8
  br label %106, !llvm.loop !36

679:                                              ; preds = %673, %669
  %680 = landingpad { ptr, i32 }
          cleanup
  %681 = extractvalue { ptr, i32 } %680, 0
  store ptr %681, ptr %16, align 8
  %682 = extractvalue { ptr, i32 } %680, 1
  store i32 %682, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %94) #8
  br label %683

683:                                              ; preds = %679, %640, %601, %324
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %20) #8
  br label %684

684:                                              ; preds = %683, %232
  call void @llvm.lifetime.end.p0(i64 80, ptr %20) #8
  br label %685

685:                                              ; preds = %684, %228, %213
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %688

686:                                              ; preds = %110
  %687 = load i32, ptr %1, align 4
  ret i32 %687

688:                                              ; preds = %685
  %689 = load ptr, ptr %16, align 8
  %690 = load i32, ptr %17, align 4
  %691 = insertvalue { ptr, i32 } poison, ptr %689, 0
  %692 = insertvalue { ptr, i32 } %691, i32 %690, 1
  resume { ptr, i32 } %692
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

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

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

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


; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::multiset" = type { %"class.std::_Rb_tree.0" }
%"class.std::multimap" = type { %"class.std::_Rb_tree" }
%"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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair.10" = type { i64, i64 }
%struct.edge = type { i64, i64, i64, i64 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@A = external dso_local global [1000000 x i64], align 16
@B = external dso_local global [1000000 x i64], align 16
@X = external dso_local global [1000000 x i64], align 16
@Y = external dso_local global [1000000 x i64], align 16
@rc1 = external dso_local local_unnamed_addr global [2000000 x i64], align 16
@indeg = external dso_local global [2000010 x i64], align 16
@cc1 = external dso_local global %"class.std::map", align 8
@cc2 = external dso_local global %"class.std::map", align 8
@s1 = external dso_local global %"class.std::set", align 8
@s2 = external dso_local global %"class.std::set", align 8
@G = external dso_local global [2000000 x %"class.std::vector"], align 16
@F = external dso_local global [2000000 x %"class.std::multiset"], align 16
@H2 = external dso_local global [2000000 x %"class.std::multimap"], align 16
@H = external dso_local global [2000000 x %"class.std::multimap"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %2 = alloca %"class.std::multiset", align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::queue", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %"struct.std::pair.10", align 8
  %11 = alloca %struct.edge, align 8
  %12 = alloca %"class.std::multiset", align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca i64, align 8
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %24 = alloca i64, align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %27 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca i64, align 8
  %30 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca %"struct.std::pair.10", align 8
  %36 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %37 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %38 = alloca i64, align 8
  %39 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %40 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %41 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %42 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %43 = getelementptr i8, ptr %42, i64 -24
  %44 = load i64, ptr %43, align 8
  %45 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %44
  %46 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %45, ptr noundef null)
  %47 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %48 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %49 = load i64, ptr @T, align 8, !tbaa !8
  %.not181 = icmp slt i64 %49, 1
  br i1 %.not181, label %._crit_edge185, label %.lr.ph184

.lr.ph184:                                        ; preds = %0
  %50 = getelementptr inbounds i8, ptr %11, i64 8
  %51 = getelementptr inbounds i8, ptr %11, i64 16
  %52 = getelementptr inbounds i8, ptr %11, i64 24
  br label %53

._crit_edge185:                                   ; preds = %360, %0
  ret i32 0

53:                                               ; preds = %.lr.ph184, %360
  %.0182 = phi i64 [ 1, %.lr.ph184 ], [ %361, %360 ]
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @cc1) #7
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @cc2) #7
  call void @_ZNSt3setIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #7
  call void @_ZNSt3setIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @s2) #7
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %54, i64 noundef %.0182)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @.str.12)
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %59 = load i64, ptr @N, align 8, !tbaa !8
  %60 = icmp sgt i64 %59, 0
  br i1 %60, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %53
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %61 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #7
  store ptr %61, ptr %1, align 8
  %62 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @s2) #7
  %63 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #7
  %.not186 = icmp eq i64 %63, 0
  br i1 %.not186, label %._crit_edge134, label %.lr.ph133

.lr.ph:                                           ; preds = %53, %.lr.ph
  %.097130 = phi i64 [ %77, %.lr.ph ], [ 0, %53 ]
  %64 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %.097130
  call void @_ZNSt8multisetIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %64) #7
  %65 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %.097130
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %65)
  %67 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %.097130
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 8 dereferenceable(8) %67)
  %69 = getelementptr inbounds [1000000 x i64], ptr @X, i64 0, i64 %.097130
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef nonnull align 8 dereferenceable(8) %69)
  %71 = getelementptr inbounds [1000000 x i64], ptr @Y, i64 0, i64 %.097130
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull align 8 dereferenceable(8) %71)
  %73 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s1, ptr noundef nonnull align 8 dereferenceable(8) %65)
  %74 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s1, ptr noundef nonnull align 8 dereferenceable(8) %67)
  %75 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s2, ptr noundef nonnull align 8 dereferenceable(8) %69)
  %76 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s2, ptr noundef nonnull align 8 dereferenceable(8) %71)
  %77 = add nuw nsw i64 %.097130, 1
  %78 = load i64, ptr @N, align 8, !tbaa !8
  %79 = icmp slt i64 %77, %78
  br i1 %79, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge134:                                   ; preds = %.lr.ph133, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  %80 = load i64, ptr @K, align 8, !tbaa !8
  %81 = icmp sgt i64 %80, 0
  br i1 %81, label %.lr.ph137, label %._crit_edge138

.lr.ph133:                                        ; preds = %._crit_edge, %.lr.ph133
  %.098131 = phi i64 [ %92, %.lr.ph133 ], [ 0, %._crit_edge ]
  %82 = getelementptr inbounds [2000000 x %"class.std::vector"], ptr @G, i64 0, i64 %.098131
  call void @_ZNSt6vectorI4edgeSaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #7
  %83 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H, i64 0, i64 %.098131
  call void @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %83) #7
  %84 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %.098131
  call void @_ZNSt8multisetIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %84) #7
  %85 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H2, i64 0, i64 %.098131
  call void @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %85) #7
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #7
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @cc1, ptr noundef nonnull align 8 dereferenceable(8) %86)
  store i64 %.098131, ptr %87, align 8, !tbaa !8
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #7
  %89 = load i64, ptr %88, align 8, !tbaa !8
  %90 = getelementptr inbounds [2000000 x i64], ptr @rc1, i64 0, i64 %.098131
  store i64 %89, ptr %90, align 8, !tbaa !8
  %91 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef 0) #7
  %92 = add nuw nsw i64 %.098131, 1
  %93 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #7
  %94 = icmp ult i64 %92, %93
  br i1 %94, label %.lr.ph133, label %._crit_edge134, !llvm.loop !13

._crit_edge138:                                   ; preds = %97, %._crit_edge134
  %95 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #7
  %gep = getelementptr i64, ptr getelementptr inbounds (i8, ptr @indeg, i64 40), i64 %95
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !14
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @indeg, ptr noundef nonnull %gep, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %103 unwind label %108

.lr.ph137:                                        ; preds = %._crit_edge134, %97
  %.099135 = phi i64 [ %98, %97 ], [ 0, %._crit_edge134 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store i64 0, ptr %3, align 8, !tbaa !8
  %96 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %97 unwind label %101

97:                                               ; preds = %.lr.ph137
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %98 = add nuw nsw i64 %.099135, 1
  %99 = load i64, ptr @K, align 8, !tbaa !8
  %100 = icmp slt i64 %98, %99
  br i1 %100, label %.lr.ph137, label %._crit_edge138, !llvm.loop !16

101:                                              ; preds = %.lr.ph137
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %367

103:                                              ; preds = %._crit_edge138
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #7
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %104 unwind label %110

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 0, ptr %6, align 8, !tbaa !8
  %105 = load i64, ptr @N, align 8, !tbaa !8
  %106 = icmp sgt i64 %105, 0
  br i1 %106, label %.lr.ph145, label %._crit_edge146

._crit_edge146:                                   ; preds = %157, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %107 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #7
  %.not187 = icmp eq i64 %107, 0
  br i1 %.not187, label %.preheader129, label %.lr.ph170

108:                                              ; preds = %._crit_edge138
  %109 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %367

110:                                              ; preds = %103
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %366

.lr.ph145:                                        ; preds = %104, %157
  %storemerge143 = phi i64 [ %159, %157 ], [ 0, %104 ]
  %112 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %storemerge143
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @cc1, ptr noundef nonnull align 8 dereferenceable(8) %112)
          to label %114 unwind label %137

114:                                              ; preds = %.lr.ph145
  %115 = load i64, ptr %113, align 8, !tbaa !8
  %116 = load i64, ptr %6, align 8, !tbaa !8
  %117 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %116
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @cc1, ptr noundef nonnull align 8 dereferenceable(8) %117)
          to label %119 unwind label %139

119:                                              ; preds = %114
  %120 = load i64, ptr %118, align 8, !tbaa !8
  %121 = getelementptr inbounds [2000010 x i64], ptr @indeg, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !8
  %123 = add nsw i64 %122, 1
  store i64 %123, ptr %121, align 8, !tbaa !8
  %124 = load i64, ptr %6, align 8, !tbaa !8
  %125 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %124
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  %126 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %125, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %127 unwind label %141

127:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %128 = load i64, ptr @K, align 8, !tbaa !8
  %129 = icmp sgt i64 %128, 1
  br i1 %129, label %.lr.ph141, label %._crit_edge142

._crit_edge142:                                   ; preds = %146, %127
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %130 = load i64, ptr %6, align 8, !tbaa !8
  %131 = getelementptr inbounds [1000000 x i64], ptr @X, i64 0, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !8
  store i64 %132, ptr %9, align 8, !tbaa !8
  %133 = getelementptr inbounds [1000000 x i64], ptr @Y, i64 0, i64 %130
  %134 = load i64, ptr %133, align 8, !tbaa !8
  %135 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H2, i64 0, i64 %115
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @_ZNSt4pairIKxxEC2IRxS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %136 = invoke ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE6insertEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %135, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %153 unwind label %162

137:                                              ; preds = %.lr.ph145
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %167

139:                                              ; preds = %114
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %167

141:                                              ; preds = %119
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %167

.lr.ph141:                                        ; preds = %127, %146
  %.0111139 = phi i64 [ %147, %146 ], [ 0, %127 ]
  %143 = load i64, ptr %6, align 8, !tbaa !8
  %144 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %143
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store i64 -999999999999999, ptr %8, align 8, !tbaa !8
  %145 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %144, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %146 unwind label %151

146:                                              ; preds = %.lr.ph141
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %147 = add nuw nsw i64 %.0111139, 1
  %148 = load i64, ptr @K, align 8, !tbaa !8
  %149 = add nsw i64 %148, -1
  %150 = icmp slt i64 %147, %149
  br i1 %150, label %.lr.ph141, label %._crit_edge142, !llvm.loop !17

151:                                              ; preds = %.lr.ph141
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %167

153:                                              ; preds = %._crit_edge142
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  %154 = getelementptr inbounds [2000000 x %"class.std::vector"], ptr @G, i64 0, i64 %115
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  store i64 %120, ptr %11, align 8, !tbaa !18
  %155 = load i64, ptr %9, align 8, !tbaa !8
  store i64 %155, ptr %50, align 8, !tbaa !20
  store i64 %134, ptr %51, align 8, !tbaa !21
  %156 = load i64, ptr %6, align 8, !tbaa !8
  store i64 %156, ptr %52, align 8, !tbaa !22
  invoke void @_ZNSt6vectorI4edgeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %154, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %157 unwind label %164

157:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %158 = load i64, ptr %6, align 8, !tbaa !8
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %6, align 8, !tbaa !8
  %160 = load i64, ptr @N, align 8, !tbaa !8
  %161 = icmp slt i64 %159, %160
  br i1 %161, label %.lr.ph145, label %._crit_edge146, !llvm.loop !23

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

164:                                              ; preds = %153
  %165 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %166

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

167:                                              ; preds = %139, %141, %151, %166, %137
  %.pn122.pn = phi { ptr, i32 } [ %138, %137 ], [ %152, %151 ], [ %.pn120, %166 ], [ %142, %141 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %365

.preheader129:                                    ; preds = %._crit_edge167, %._crit_edge146
  %168 = load i64, ptr @N, align 8, !tbaa !8
  %169 = icmp sgt i64 %168, 0
  br i1 %169, label %.lr.ph175, label %._crit_edge176

.lr.ph170:                                        ; preds = %._crit_edge146, %._crit_edge167
  %.0112168 = phi i64 [ %312, %._crit_edge167 ], [ 0, %._crit_edge146 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %12) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  %170 = load i64, ptr @K, align 8, !tbaa !8
  %171 = icmp sgt i64 %170, 0
  br i1 %171, label %.lr.ph149, label %._crit_edge150

._crit_edge150:                                   ; preds = %179, %.lr.ph170
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %172 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H2, i64 0, i64 %.0112168
  %173 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %172) #7
  store ptr %173, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %174 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H, i64 0, i64 %.0112168
  %175 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %174) #7
  store ptr %175, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %176 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %174) #7
  store ptr %176, ptr %16, align 8
  %177 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br i1 %177, label %.preheader, label %._crit_edge158

.lr.ph149:                                        ; preds = %.lr.ph170, %179
  %.0113147 = phi i64 [ %180, %179 ], [ 0, %.lr.ph170 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  store i64 -99999999999, ptr %13, align 8, !tbaa !8
  %178 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %179 unwind label %183

179:                                              ; preds = %.lr.ph149
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %180 = add nuw nsw i64 %.0113147, 1
  %181 = load i64, ptr @K, align 8, !tbaa !8
  %182 = icmp slt i64 %180, %181
  br i1 %182, label %.lr.ph149, label %._crit_edge150, !llvm.loop !24

183:                                              ; preds = %.lr.ph149
  %184 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %324

.preheader:                                       ; preds = %._crit_edge150, %._crit_edge157
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %185 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %172) #7
  store ptr %185, ptr %17, align 8
  %186 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br i1 %186, label %.lr.ph154, label %.critedge

._crit_edge158:                                   ; preds = %._crit_edge157, %._crit_edge150
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #7
  %187 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %172) #7
  store ptr %187, ptr %26, align 8
  %188 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  br i1 %188, label %.lr.ph163, label %._crit_edge164

.lr.ph154:                                        ; preds = %.preheader, %._crit_edge153
  %189 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %190 = load i64, ptr %189, align 8, !tbaa !25
  %191 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %192 = load i64, ptr %191, align 8, !tbaa !25
  %.not115 = icmp sgt i64 %190, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br i1 %.not115, label %.loopexit, label %193

193:                                              ; preds = %.lr.ph154
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  %194 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  store ptr %194, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %195 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  store ptr %195, ptr %19, align 8
  %196 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br i1 %196, label %.lr.ph152, label %._crit_edge153

._crit_edge153:                                   ; preds = %233, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  %197 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %198 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %172) #7
  store ptr %198, ptr %17, align 8
  %199 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br i1 %199, label %.lr.ph154, label %.critedge, !llvm.loop !27

.lr.ph152:                                        ; preds = %193, %233
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %201 = load i64, ptr %200, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  %202 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %203 = load i64, ptr %202, align 8, !tbaa !25
  %204 = add nsw i64 %203, %201
  store i64 %204, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  %205 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %206 = getelementptr inbounds i8, ptr %205, i64 8
  %207 = load i64, ptr %206, align 8, !tbaa !28
  %208 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %207
  %209 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %208) #7
  store ptr %209, ptr %21, align 8
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %211 = load i64, ptr %210, align 8, !tbaa !8
  %212 = load i64, ptr %20, align 8, !tbaa !8
  %213 = icmp slt i64 %211, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  br i1 %213, label %214, label %233

214:                                              ; preds = %.lr.ph152
  %215 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %216 = getelementptr inbounds i8, ptr %215, i64 8
  %217 = load i64, ptr %216, align 8, !tbaa !28
  %218 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %217
  %219 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %220 = getelementptr inbounds i8, ptr %219, i64 8
  %221 = load i64, ptr %220, align 8, !tbaa !28
  %222 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %221
  %223 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %222) #7
  %224 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %218, ptr %223)
          to label %225 unwind label %231

225:                                              ; preds = %214
  %226 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %227 = getelementptr inbounds i8, ptr %226, i64 8
  %228 = load i64, ptr %227, align 8, !tbaa !28
  %229 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %228
  %230 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %229, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %233 unwind label %231

231:                                              ; preds = %225, %214
  %232 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br label %265

233:                                              ; preds = %225, %.lr.ph152
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %235 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br i1 %235, label %.lr.ph152, label %._crit_edge153

.critedge:                                        ; preds = %._crit_edge153, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph154, %.critedge
  %236 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %237 = getelementptr inbounds i8, ptr %236, i64 8
  %238 = load i64, ptr %237, align 8, !tbaa !28
  %239 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %238
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %240 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %239) #7
  store ptr %240, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  %241 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %239) #7
  store ptr %241, ptr %23, align 8
  %242 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  br i1 %242, label %.lr.ph156, label %._crit_edge157

._crit_edge157:                                   ; preds = %262, %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  %243 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %244 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %174) #7
  store ptr %244, ptr %16, align 8
  %245 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br i1 %245, label %.preheader, label %._crit_edge158, !llvm.loop !29

.lr.ph156:                                        ; preds = %.loopexit, %262
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %247 = load i64, ptr %246, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  %248 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %249 = load i64, ptr %248, align 8, !tbaa !25
  %250 = sub nsw i64 %247, %249
  store i64 %250, ptr %24, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #7
  %251 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  store ptr %251, ptr %25, align 8
  %252 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  %253 = load i64, ptr %252, align 8, !tbaa !8
  %254 = icmp sgt i64 %250, %253
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  br i1 %254, label %255, label %262

255:                                              ; preds = %.lr.ph156
  %256 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  %257 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr %256)
          to label %258 unwind label %260

258:                                              ; preds = %255
  %259 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %262 unwind label %260

260:                                              ; preds = %258, %255
  %261 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %265

262:                                              ; preds = %258, %.lr.ph156
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  %263 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %264 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  br i1 %264, label %.lr.ph156, label %._crit_edge157

265:                                              ; preds = %260, %231
  %.pn = phi { ptr, i32 } [ %232, %231 ], [ %261, %260 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %323

.lr.ph163:                                        ; preds = %._crit_edge158, %._crit_edge161
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #7
  %266 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  store ptr %266, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #7
  %267 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  store ptr %267, ptr %28, align 8
  %268 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br i1 %268, label %.lr.ph160, label %._crit_edge161

._crit_edge161:                                   ; preds = %305, %.lr.ph163
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  %269 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #7
  %270 = call ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %172) #7
  store ptr %270, ptr %26, align 8
  %271 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKxxEES5_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  br i1 %271, label %.lr.ph163, label %._crit_edge164, !llvm.loop !30

.lr.ph160:                                        ; preds = %.lr.ph163, %305
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %273 = load i64, ptr %272, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #7
  %274 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %275 = load i64, ptr %274, align 8, !tbaa !25
  %276 = add nsw i64 %275, %273
  store i64 %276, ptr %29, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #7
  %277 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %278 = getelementptr inbounds i8, ptr %277, i64 8
  %279 = load i64, ptr %278, align 8, !tbaa !28
  %280 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %279
  %281 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %280) #7
  store ptr %281, ptr %30, align 8
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  %283 = load i64, ptr %282, align 8, !tbaa !8
  %284 = load i64, ptr %29, align 8, !tbaa !8
  %285 = icmp slt i64 %283, %284
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  br i1 %285, label %286, label %305

286:                                              ; preds = %.lr.ph160
  %287 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %288 = getelementptr inbounds i8, ptr %287, i64 8
  %289 = load i64, ptr %288, align 8, !tbaa !28
  %290 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %289
  %291 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %290, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %292 unwind label %303

292:                                              ; preds = %286
  %293 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %294 = getelementptr inbounds i8, ptr %293, i64 8
  %295 = load i64, ptr %294, align 8, !tbaa !28
  %296 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %295
  %297 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %298 = getelementptr inbounds i8, ptr %297, i64 8
  %299 = load i64, ptr %298, align 8, !tbaa !28
  %300 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %299
  %301 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %300) #7
  %302 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %296, ptr %301)
          to label %305 unwind label %303

303:                                              ; preds = %292, %286
  %304 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  br label %323

305:                                              ; preds = %292, %.lr.ph160
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  %306 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %307 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br i1 %307, label %.lr.ph160, label %._crit_edge161

._crit_edge164:                                   ; preds = %._crit_edge161, %._crit_edge158
  %308 = getelementptr inbounds [2000000 x %"class.std::vector"], ptr @G, i64 0, i64 %.0112168
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #7
  %309 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %308) #7
  store ptr %309, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #7
  %310 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %308) #7
  store ptr %310, ptr %32, align 8
  %311 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  br i1 %311, label %.lr.ph166, label %._crit_edge167

._crit_edge167:                                   ; preds = %318, %._crit_edge164
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #7
  %312 = add nuw nsw i64 %.0112168, 1
  %313 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @s1) #7
  %314 = icmp ult i64 %312, %313
  br i1 %314, label %.lr.ph170, label %.preheader129, !llvm.loop !31

.lr.ph166:                                        ; preds = %._crit_edge164, %318
  %315 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #7
  %.sroa.013.0.copyload = load i64, ptr %315, align 8, !tbaa !8
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %315, i64 16
  %.sroa.6.0.copyload = load i64, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !8
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %315, i64 24
  %.sroa.7.0.copyload = load i64, ptr %.sroa.7.0..sroa_idx, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #7
  store i64 %.sroa.6.0.copyload, ptr %33, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #7
  store i64 %.sroa.7.0.copyload, ptr %34, align 8, !tbaa !8
  %316 = getelementptr inbounds [2000000 x %"class.std::multimap"], ptr @H, i64 0, i64 %.sroa.013.0.copyload
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %35) #7
  call void @_ZNSt4pairIKxxEC2IRxS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %317 = invoke ptr @_ZNSt8multimapIxxSt4lessIxESaISt4pairIKxxEEE6insertEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %316, ptr noundef nonnull align 8 dereferenceable(16) %35)
          to label %318 unwind label %321

318:                                              ; preds = %.lr.ph166
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #7
  %319 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #7
  %320 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  br i1 %320, label %.lr.ph166, label %._crit_edge167

321:                                              ; preds = %.lr.ph166
  %322 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #7
  br label %323

323:                                              ; preds = %321, %303, %265
  %.pn.pn = phi { ptr, i32 } [ %.pn, %265 ], [ %304, %303 ], [ %322, %321 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %324

324:                                              ; preds = %323, %183
  %.pn118 = phi { ptr, i32 } [ %184, %183 ], [ %.pn.pn, %323 ]
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #7
  br label %365

._crit_edge176:                                   ; preds = %._crit_edge173, %.preheader129
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %40) #7
  %325 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %325, ptr %40, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %41) #7
  %326 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %326, ptr %41, align 8
  %327 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %41) #7
  br i1 %327, label %.lr.ph179, label %._crit_edge180

.lr.ph175:                                        ; preds = %.preheader129, %._crit_edge173
  %.0101174 = phi i64 [ %332, %._crit_edge173 ], [ 0, %.preheader129 ]
  %328 = getelementptr inbounds [2000000 x %"class.std::multiset"], ptr @F, i64 0, i64 %.0101174
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #7
  %329 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %328) #7
  store ptr %329, ptr %36, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %37) #7
  %330 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %328) #7
  store ptr %330, ptr %37, align 8
  %331 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  br i1 %331, label %.lr.ph172, label %._crit_edge173

._crit_edge173:                                   ; preds = %348, %.lr.ph175
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #7
  %332 = add nuw nsw i64 %.0101174, 1
  %333 = load i64, ptr @N, align 8, !tbaa !8
  %334 = icmp slt i64 %332, %333
  br i1 %334, label %.lr.ph175, label %._crit_edge176, !llvm.loop !32

.lr.ph172:                                        ; preds = %.lr.ph175, %348
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %38) #7
  %335 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  %336 = load i64, ptr %335, align 8, !tbaa !8
  store i64 %336, ptr %38, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %39) #7
  %337 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %337, ptr %39, align 8
  %338 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #7
  %339 = load i64, ptr %338, align 8, !tbaa !8
  %340 = icmp sgt i64 %336, %339
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #7
  br i1 %340, label %341, label %348

341:                                              ; preds = %.lr.ph172
  %342 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  %343 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr %342)
          to label %344 unwind label %346

344:                                              ; preds = %341
  %345 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %348 unwind label %346

346:                                              ; preds = %344, %341
  %347 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #7
  br label %365

348:                                              ; preds = %344, %.lr.ph172
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #7
  %349 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  %350 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  br i1 %350, label %.lr.ph172, label %._crit_edge173

._crit_edge180:                                   ; preds = %.lr.ph179, %._crit_edge176
  %.096.lcssa = phi i64 [ 0, %._crit_edge176 ], [ %355, %.lr.ph179 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #7
  %351 = srem i64 %.096.lcssa, 1000000007
  %352 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %351)
          to label %358 unwind label %363

.lr.ph179:                                        ; preds = %._crit_edge176, %.lr.ph179
  %.096177 = phi i64 [ %355, %.lr.ph179 ], [ 0, %._crit_edge176 ]
  %353 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #7
  %354 = load i64, ptr %353, align 8, !tbaa !8
  %355 = add nsw i64 %354, %.096177
  %356 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #7
  %357 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %41) #7
  br i1 %357, label %.lr.ph179, label %._crit_edge180

358:                                              ; preds = %._crit_edge180
  %359 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %352, i8 noundef signext 10)
          to label %360 unwind label %363

360:                                              ; preds = %358
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %361 = add nuw nsw i64 %.0182, 1
  %362 = load i64, ptr @T, align 8, !tbaa !8
  %.not.not = icmp slt i64 %.0182, %362
  br i1 %.not.not, label %53, label %._crit_edge185, !llvm.loop !33

363:                                              ; preds = %358, %._crit_edge180
  %364 = landingpad { ptr, i32 }
          cleanup
  br label %365

365:                                              ; preds = %363, %346, %324, %167
  %.pn122.pn.pn = phi { ptr, i32 } [ %.pn122.pn, %167 ], [ %.pn118, %324 ], [ %347, %346 ], [ %364, %363 ]
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #7
  br label %366

366:                                              ; preds = %365, %110
  %.pn122.pn.pn.pn = phi { ptr, i32 } [ %.pn122.pn.pn, %365 ], [ %111, %110 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  br label %367

367:                                              ; preds = %366, %108, %101
  %.pn127 = phi { ptr, i32 } [ %102, %101 ], [ %.pn122.pn.pn.pn, %366 ], [ %109, %108 ]
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn127
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

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

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

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


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