; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2007.02 (lilypad)

; 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::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 }
%struct.dat = type { i8, i64, i64 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<dat, std::allocator<dat>>::_Vector_impl" }
%"struct.std::_Vector_base<dat, std::allocator<dat>>::_Vector_impl" = type { %"struct.std::_Vector_base<dat, std::allocator<dat>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dat, std::allocator<dat>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, 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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.8" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector.10", [8 x i8] }>
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, long long>, std::allocator<std::pair<std::pair<long long, long long>, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, long long>, std::allocator<std::pair<std::pair<long long, long long>, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, long long>, std::allocator<std::pair<std::pair<long long, long long>, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, long long>, std::allocator<std::pair<std::pair<long long, long long>, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.15" = type { %"struct.std::pair", i64 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = 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" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@M = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@vis = external dso_local global [900 x i8], align 16
@vis2 = external dso_local global [900 x [900 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@__const.main.t = external hidden unnamed_addr constant %struct.dat, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7genLocsSt4pairIxxE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64, i64) #0

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %struct.dat, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::stack", align 8
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca %"struct.std::pair", align 8
  %25 = alloca %"class.std::vector", align 8
  %26 = alloca %"struct.std::pair", align 8
  %27 = alloca ptr, align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca %"struct.std::pair", align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca %"class.std::vector", align 8
  %35 = alloca %"struct.std::pair", align 8
  %36 = alloca ptr, align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %39 = alloca %"struct.std::pair", align 8
  %40 = alloca %"struct.std::pair.8", align 8
  %41 = alloca %"class.std::priority_queue", align 8
  %42 = alloca %"struct.std::pair.15", align 8
  %43 = alloca %"struct.std::pair", align 8
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i64, align 8
  %47 = alloca i64, align 8
  %48 = alloca i64, align 8
  %49 = alloca ptr, align 8
  %50 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %51 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %52 = alloca i64, align 8
  %53 = alloca %"struct.std::pair.15", align 8
  %54 = alloca %"struct.std::pair", align 8
  %55 = alloca i64, align 8
  %56 = alloca ptr, align 8
  %57 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %58 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %59 = alloca i64, align 8
  %60 = alloca %"struct.std::pair.15", align 8
  %61 = alloca %"struct.std::pair", align 8
  %62 = alloca i64, align 8
  %63 = alloca ptr, align 8
  %64 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %65 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %66 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %67 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %68 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %69 = getelementptr i8, ptr %68, i64 -24
  %70 = load i64, ptr %69, align 8
  %71 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %70
  %72 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %71, ptr noundef null)
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %75 = load i64, ptr @M, align 8, !tbaa !8
  %76 = load i64, ptr @N, align 8, !tbaa !8
  %77 = call ptr @llvm.stacksave.p0()
  store ptr %77, ptr %2, align 8
  %78 = mul nuw i64 %75, %76
  %79 = alloca i64, i64 %78, align 16
  store i64 %75, ptr %3, align 8
  store i64 %76, ptr %4, align 8
  %80 = load i64, ptr @M, align 8, !tbaa !8
  %81 = load i64, ptr @N, align 8, !tbaa !8
  %82 = mul nuw i64 %80, %81
  %83 = alloca i64, i64 %82, align 16
  store i64 %80, ptr %5, align 8
  store i64 %81, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #9
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %84

84:                                               ; preds = %136, %0
  %85 = load i64, ptr %9, align 8, !tbaa !8
  %86 = load i64, ptr @M, align 8, !tbaa !8
  %87 = icmp slt i64 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  br label %139

89:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %90

90:                                               ; preds = %132, %89
  %91 = load i64, ptr %11, align 8, !tbaa !8
  %92 = load i64, ptr @N, align 8, !tbaa !8
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %135

95:                                               ; preds = %90
  %96 = load i64, ptr %9, align 8, !tbaa !8
  %97 = mul nsw i64 %96, %76
  %98 = getelementptr inbounds i64, ptr %79, i64 %97
  %99 = load i64, ptr %11, align 8, !tbaa !8
  %100 = getelementptr inbounds i64, ptr %98, i64 %99
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %100)
  %102 = load i64, ptr %9, align 8, !tbaa !8
  %103 = mul nsw i64 %102, %76
  %104 = getelementptr inbounds i64, ptr %79, i64 %103
  %105 = load i64, ptr %11, align 8, !tbaa !8
  %106 = getelementptr inbounds i64, ptr %104, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !8
  %108 = icmp eq i64 %107, 3
  br i1 %108, label %109, label %116

109:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  %111 = load i64, ptr %9, align 8, !tbaa !8
  %112 = mul nsw i64 %111, %76
  %113 = getelementptr inbounds i64, ptr %79, i64 %112
  %114 = load i64, ptr %11, align 8, !tbaa !8
  %115 = getelementptr inbounds i64, ptr %113, i64 %114
  store i64 1, ptr %115, align 8, !tbaa !8
  br label %116

116:                                              ; preds = %109, %95
  %117 = load i64, ptr %9, align 8, !tbaa !8
  %118 = mul nsw i64 %117, %76
  %119 = getelementptr inbounds i64, ptr %79, i64 %118
  %120 = load i64, ptr %11, align 8, !tbaa !8
  %121 = getelementptr inbounds i64, ptr %119, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !8
  %123 = icmp eq i64 %122, 4
  br i1 %123, label %124, label %131

124:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %13) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  %126 = load i64, ptr %9, align 8, !tbaa !8
  %127 = mul nsw i64 %126, %76
  %128 = getelementptr inbounds i64, ptr %79, i64 %127
  %129 = load i64, ptr %11, align 8, !tbaa !8
  %130 = getelementptr inbounds i64, ptr %128, i64 %129
  store i64 1, ptr %130, align 8, !tbaa !8
  br label %131

131:                                              ; preds = %124, %116
  br label %132

132:                                              ; preds = %131
  %133 = load i64, ptr %11, align 8, !tbaa !8
  %134 = add nsw i64 %133, 1
  store i64 %134, ptr %11, align 8, !tbaa !8
  br label %90, !llvm.loop !11

135:                                              ; preds = %94
  br label %136

136:                                              ; preds = %135
  %137 = load i64, ptr %9, align 8, !tbaa !8
  %138 = add nsw i64 %137, 1
  store i64 %138, ptr %9, align 8, !tbaa !8
  br label %84, !llvm.loop !13

139:                                              ; preds = %88
  %140 = mul nsw i64 0, %81
  %141 = getelementptr inbounds i64, ptr %83, i64 %140
  %142 = load i64, ptr @M, align 8, !tbaa !8
  %143 = sub nsw i64 %142, 1
  %144 = mul nsw i64 %143, %81
  %145 = getelementptr inbounds i64, ptr %83, i64 %144
  %146 = load i64, ptr @N, align 8, !tbaa !8
  %147 = getelementptr inbounds i64, ptr %145, i64 %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 -1, ptr %14, align 4, !tbaa !14
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %141, ptr noundef %147, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #9
  call void @_ZNSt6vectorI3datSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  store i64 0, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  store i64 0, ptr %17, align 8, !tbaa !8
  br label %148

148:                                              ; preds = %305, %139
  %149 = load i64, ptr %17, align 8, !tbaa !8
  %150 = load i64, ptr @M, align 8, !tbaa !8
  %151 = icmp slt i64 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %308

153:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  store i64 0, ptr %18, align 8, !tbaa !8
  br label %154

154:                                              ; preds = %298, %153
  %155 = load i64, ptr %18, align 8, !tbaa !8
  %156 = load i64, ptr @N, align 8, !tbaa !8
  %157 = icmp slt i64 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %304

159:                                              ; preds = %154
  %160 = load i64, ptr %17, align 8, !tbaa !8
  %161 = mul nsw i64 %160, %81
  %162 = getelementptr inbounds i64, ptr %83, i64 %161
  %163 = load i64, ptr %18, align 8, !tbaa !8
  %164 = getelementptr inbounds i64, ptr %162, i64 %163
  %165 = load i64, ptr %164, align 8, !tbaa !8
  %166 = icmp ne i64 %165, -1
  br i1 %166, label %175, label %167

167:                                              ; preds = %159
  %168 = load i64, ptr %17, align 8, !tbaa !8
  %169 = mul nsw i64 %168, %76
  %170 = getelementptr inbounds i64, ptr %79, i64 %169
  %171 = load i64, ptr %18, align 8, !tbaa !8
  %172 = getelementptr inbounds i64, ptr %170, i64 %171
  %173 = load i64, ptr %172, align 8, !tbaa !8
  %174 = icmp eq i64 %173, 2
  br i1 %174, label %175, label %176

175:                                              ; preds = %167, %159
  br label %298

176:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 @__const.main.t, i64 24, i1 false)
  %177 = load i64, ptr %17, align 8, !tbaa !8
  %178 = mul nsw i64 %177, %76
  %179 = getelementptr inbounds i64, ptr %79, i64 %178
  %180 = load i64, ptr %18, align 8, !tbaa !8
  %181 = getelementptr inbounds i64, ptr %179, i64 %180
  %182 = load i64, ptr %181, align 8, !tbaa !8
  %183 = icmp eq i64 %182, 0
  br i1 %183, label %184, label %199

184:                                              ; preds = %176
  %185 = load i64, ptr %16, align 8, !tbaa !8
  %186 = load i64, ptr %17, align 8, !tbaa !8
  %187 = mul nsw i64 %186, %81
  %188 = getelementptr inbounds i64, ptr %83, i64 %187
  %189 = load i64, ptr %18, align 8, !tbaa !8
  %190 = getelementptr inbounds i64, ptr %188, i64 %189
  store i64 %185, ptr %190, align 8, !tbaa !8
  %191 = getelementptr inbounds %struct.dat, ptr %19, i32 0, i32 0
  store i8 1, ptr %191, align 8, !tbaa !16
  invoke void @_ZNSt6vectorI3datSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %192 unwind label %195

192:                                              ; preds = %184
  %193 = load i64, ptr %16, align 8, !tbaa !8
  %194 = add nsw i64 %193, 1
  store i64 %194, ptr %16, align 8, !tbaa !8
  store i32 13, ptr %10, align 4
  br label %295

195:                                              ; preds = %184
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %20, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %21, align 4
  br label %303

199:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 80, ptr %22) #9
  invoke void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %200 unwind label %222

200:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #9
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %201 unwind label %226

201:                                              ; preds = %200
  invoke void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %22, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %202 unwind label %226

202:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #9
  br label %203

203:                                              ; preds = %288, %286, %202
  %204 = invoke noundef zeroext i1 @_ZNKSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %205 unwind label %230

205:                                              ; preds = %203
  %206 = xor i1 %204, true
  br i1 %206, label %207, label %291

207:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #9
  %208 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %209 unwind label %234

209:                                              ; preds = %207
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %208, i64 16, i1 false)
  invoke void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %210 unwind label %234

210:                                              ; preds = %209
  %211 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 0
  %212 = load i64, ptr %211, align 8, !tbaa !19
  %213 = mul nsw i64 %212, %81
  %214 = getelementptr inbounds i64, ptr %83, i64 %213
  %215 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 1
  %216 = load i64, ptr %215, align 8, !tbaa !21
  %217 = getelementptr inbounds i64, ptr %214, i64 %216
  %218 = load i64, ptr %217, align 8, !tbaa !8
  %219 = load i64, ptr %16, align 8, !tbaa !8
  %220 = icmp eq i64 %218, %219
  br i1 %220, label %221, label %238

221:                                              ; preds = %210
  store i32 14, ptr %10, align 4
  br label %286, !llvm.loop !22

222:                                              ; preds = %199
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %20, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %21, align 4
  br label %302

226:                                              ; preds = %201, %200
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %20, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #9
  br label %301

230:                                              ; preds = %291, %203
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %20, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %21, align 4
  br label %301

234:                                              ; preds = %209, %207
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %20, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %21, align 4
  br label %290

238:                                              ; preds = %210
  %239 = load i64, ptr %16, align 8, !tbaa !8
  %240 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 0
  %241 = load i64, ptr %240, align 8, !tbaa !19
  %242 = mul nsw i64 %241, %81
  %243 = getelementptr inbounds i64, ptr %83, i64 %242
  %244 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 1
  %245 = load i64, ptr %244, align 8, !tbaa !21
  %246 = getelementptr inbounds i64, ptr %243, i64 %245
  store i64 %239, ptr %246, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %24, i64 16, i1 false)
  %247 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 0
  %248 = load i64, ptr %247, align 8
  %249 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 1
  %250 = load i64, ptr %249, align 8
  invoke void @_Z7genLocsSt4pairIxxE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %25, i64 %248, i64 %250)
          to label %251 unwind label %261

251:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  store ptr %25, ptr %27, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %252 = load ptr, ptr %27, align 8, !tbaa !23
  %253 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %252) #9
  %254 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %253, ptr %254, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %255 = load ptr, ptr %27, align 8, !tbaa !23
  %256 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %255) #9
  %257 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %256, ptr %257, align 8
  br label %258

258:                                              ; preds = %283, %251
  %259 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #9
  br i1 %259, label %265, label %260

260:                                              ; preds = %258
  store i32 16, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %285

261:                                              ; preds = %238
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %20, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %21, align 4
  br label %289

265:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #9
  %266 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %266, i64 16, i1 false)
  %267 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 0
  %268 = load i64, ptr %267, align 8, !tbaa !19
  %269 = mul nsw i64 %268, %76
  %270 = getelementptr inbounds i64, ptr %79, i64 %269
  %271 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 1
  %272 = load i64, ptr %271, align 8, !tbaa !21
  %273 = getelementptr inbounds i64, ptr %270, i64 %272
  %274 = load i64, ptr %273, align 8, !tbaa !8
  %275 = icmp eq i64 %274, 1
  br i1 %275, label %276, label %282

276:                                              ; preds = %265
  invoke void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %22, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %277 unwind label %278

277:                                              ; preds = %276
  br label %282

278:                                              ; preds = %276
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %20, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  br label %289

282:                                              ; preds = %277, %265
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #9
  br label %283

283:                                              ; preds = %282
  %284 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #9
  br label %258

285:                                              ; preds = %260
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #9
  store i32 0, ptr %10, align 4
  br label %286

286:                                              ; preds = %285, %221
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #9
  %287 = load i32, ptr %10, align 4
  switch i32 %287, label %886 [
    i32 0, label %288
    i32 14, label %203
  ]

288:                                              ; preds = %286
  br label %203, !llvm.loop !22

289:                                              ; preds = %278, %261
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #9
  br label %290

290:                                              ; preds = %289, %234
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #9
  br label %301

291:                                              ; preds = %205
  invoke void @_ZNSt6vectorI3datSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %292 unwind label %230

292:                                              ; preds = %291
  %293 = load i64, ptr %16, align 8, !tbaa !8
  %294 = add nsw i64 %293, 1
  store i64 %294, ptr %16, align 8, !tbaa !8
  call void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %22) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %22) #9
  store i32 0, ptr %10, align 4
  br label %295

295:                                              ; preds = %292, %192
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #9
  %296 = load i32, ptr %10, align 4
  switch i32 %296, label %886 [
    i32 0, label %297
    i32 13, label %298
  ]

297:                                              ; preds = %295
  br label %298

298:                                              ; preds = %297, %295, %175
  %299 = load i64, ptr %18, align 8, !tbaa !8
  %300 = add nsw i64 %299, 1
  store i64 %300, ptr %18, align 8, !tbaa !8
  br label %154, !llvm.loop !25

301:                                              ; preds = %290, %230, %226
  call void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %22) #9
  br label %302

302:                                              ; preds = %301, %222
  call void @llvm.lifetime.end.p0(i64 80, ptr %22) #9
  br label %303

303:                                              ; preds = %302, %195
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %880

304:                                              ; preds = %158
  br label %305

305:                                              ; preds = %304
  %306 = load i64, ptr %17, align 8, !tbaa !8
  %307 = add nsw i64 %306, 1
  store i64 %307, ptr %17, align 8, !tbaa !8
  br label %148, !llvm.loop !26

308:                                              ; preds = %152
  %309 = load i64, ptr %16, align 8, !tbaa !8
  %310 = alloca %"class.std::set", i64 %309, align 16
  store i64 %309, ptr %31, align 8
  %311 = icmp eq i64 %309, 0
  br i1 %311, label %318, label %312

312:                                              ; preds = %308
  %313 = getelementptr inbounds %"class.std::set", ptr %310, i64 %309
  br label %314

314:                                              ; preds = %314, %312
  %315 = phi ptr [ %310, %312 ], [ %316, %314 ]
  call void @_ZNSt3setIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %315) #9
  %316 = getelementptr inbounds %"class.std::set", ptr %315, i64 1
  %317 = icmp eq ptr %316, %313
  br i1 %317, label %318, label %314

318:                                              ; preds = %314, %308
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  store i64 0, ptr %32, align 8, !tbaa !8
  br label %319

319:                                              ; preds = %407, %318
  %320 = load i64, ptr %32, align 8, !tbaa !8
  %321 = load i64, ptr @M, align 8, !tbaa !8
  %322 = icmp slt i64 %320, %321
  br i1 %322, label %324, label %323

323:                                              ; preds = %319
  store i32 18, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %410

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

325:                                              ; preds = %402, %324
  %326 = load i64, ptr %33, align 8, !tbaa !8
  %327 = load i64, ptr @N, align 8, !tbaa !8
  %328 = icmp slt i64 %326, %327
  br i1 %328, label %330, label %329

329:                                              ; preds = %325
  store i32 21, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  br label %406

330:                                              ; preds = %325
  %331 = load i64, ptr %32, align 8, !tbaa !8
  %332 = mul nsw i64 %331, %76
  %333 = getelementptr inbounds i64, ptr %79, i64 %332
  %334 = load i64, ptr %33, align 8, !tbaa !8
  %335 = getelementptr inbounds i64, ptr %333, i64 %334
  %336 = load i64, ptr %335, align 8, !tbaa !8
  %337 = icmp eq i64 %336, 2
  br i1 %337, label %338, label %339

338:                                              ; preds = %330
  br label %402

339:                                              ; preds = %330
  call void @llvm.lifetime.start.p0(i64 24, ptr %34) #9
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %340 unwind label %355

340:                                              ; preds = %339
  %341 = getelementptr inbounds { i64, i64 }, ptr %35, i32 0, i32 0
  %342 = load i64, ptr %341, align 8
  %343 = getelementptr inbounds { i64, i64 }, ptr %35, i32 0, i32 1
  %344 = load i64, ptr %343, align 8
  invoke void @_Z7genLocsSt4pairIxxE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %34, i64 %342, i64 %344)
          to label %345 unwind label %355

345:                                              ; preds = %340
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  store ptr %34, ptr %36, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #9
  %346 = load ptr, ptr %36, align 8, !tbaa !23
  %347 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %346) #9
  %348 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  store ptr %347, ptr %348, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %349 = load ptr, ptr %36, align 8, !tbaa !23
  %350 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %349) #9
  %351 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %38, i32 0, i32 0
  store ptr %350, ptr %351, align 8
  br label %352

352:                                              ; preds = %395, %345
  %353 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  br i1 %353, label %359, label %354

354:                                              ; preds = %352
  store i32 24, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  br label %401

355:                                              ; preds = %340, %339
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %20, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %21, align 4
  br label %405

359:                                              ; preds = %352
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #9
  %360 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %360, i64 16, i1 false)
  %361 = getelementptr inbounds %"struct.std::pair", ptr %39, i32 0, i32 0
  %362 = load i64, ptr %361, align 8, !tbaa !19
  %363 = mul nsw i64 %362, %81
  %364 = getelementptr inbounds i64, ptr %83, i64 %363
  %365 = getelementptr inbounds %"struct.std::pair", ptr %39, i32 0, i32 1
  %366 = load i64, ptr %365, align 8, !tbaa !21
  %367 = getelementptr inbounds i64, ptr %364, i64 %366
  %368 = load i64, ptr %367, align 8, !tbaa !8
  %369 = icmp eq i64 %368, -1
  br i1 %369, label %370, label %371

370:                                              ; preds = %359
  store i32 25, ptr %10, align 4
  br label %392

371:                                              ; preds = %359
  %372 = load i64, ptr %32, align 8, !tbaa !8
  %373 = mul nsw i64 %372, %81
  %374 = getelementptr inbounds i64, ptr %83, i64 %373
  %375 = load i64, ptr %33, align 8, !tbaa !8
  %376 = getelementptr inbounds i64, ptr %374, i64 %375
  %377 = load i64, ptr %376, align 8, !tbaa !8
  %378 = getelementptr inbounds %"class.std::set", ptr %310, i64 %377
  %379 = getelementptr inbounds %"struct.std::pair", ptr %39, i32 0, i32 0
  %380 = load i64, ptr %379, align 8, !tbaa !19
  %381 = mul nsw i64 %380, %81
  %382 = getelementptr inbounds i64, ptr %83, i64 %381
  %383 = getelementptr inbounds %"struct.std::pair", ptr %39, i32 0, i32 1
  %384 = load i64, ptr %383, align 8, !tbaa !21
  %385 = getelementptr inbounds i64, ptr %382, i64 %384
  %386 = invoke { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %378, ptr noundef nonnull align 8 dereferenceable(8) %385)
          to label %387 unwind label %397

387:                                              ; preds = %371
  %388 = getelementptr inbounds { ptr, i8 }, ptr %40, i32 0, i32 0
  %389 = extractvalue { ptr, i8 } %386, 0
  store ptr %389, ptr %388, align 8
  %390 = getelementptr inbounds { ptr, i8 }, ptr %40, i32 0, i32 1
  %391 = extractvalue { ptr, i8 } %386, 1
  store i8 %391, ptr %390, align 8
  store i32 0, ptr %10, align 4
  br label %392

392:                                              ; preds = %387, %370
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #9
  %393 = load i32, ptr %10, align 4
  switch i32 %393, label %886 [
    i32 0, label %394
    i32 25, label %395
  ]

394:                                              ; preds = %392
  br label %395

395:                                              ; preds = %394, %392
  %396 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  br label %352

397:                                              ; preds = %371
  %398 = landingpad { ptr, i32 }
          cleanup
  %399 = extractvalue { ptr, i32 } %398, 0
  store ptr %399, ptr %20, align 8
  %400 = extractvalue { ptr, i32 } %398, 1
  store i32 %400, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #9
  br label %405

401:                                              ; preds = %354
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #9
  br label %402

402:                                              ; preds = %401, %338
  %403 = load i64, ptr %33, align 8, !tbaa !8
  %404 = add nsw i64 %403, 1
  store i64 %404, ptr %33, align 8, !tbaa !8
  br label %325, !llvm.loop !27

405:                                              ; preds = %397, %355
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %872

406:                                              ; preds = %329
  br label %407

407:                                              ; preds = %406
  %408 = load i64, ptr %32, align 8, !tbaa !8
  %409 = add nsw i64 %408, 1
  store i64 %409, ptr %32, align 8, !tbaa !8
  br label %319, !llvm.loop !28

410:                                              ; preds = %323
  call void @llvm.lifetime.start.p0(i64 32, ptr %41) #9
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %41)
          to label %411 unwind label %462

411:                                              ; preds = %410
  call void @llvm.lifetime.start.p0(i64 24, ptr %42) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  store i32 0, ptr %44, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #9
  store i32 0, ptr %45, align 4, !tbaa !14
  invoke void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 4 dereferenceable(4) %45)
          to label %412 unwind label %466

412:                                              ; preds = %411
  %413 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 0
  %414 = load i64, ptr %413, align 8, !tbaa !19
  %415 = mul nsw i64 %414, %81
  %416 = getelementptr inbounds i64, ptr %83, i64 %415
  %417 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 1
  %418 = load i64, ptr %417, align 8, !tbaa !21
  %419 = getelementptr inbounds i64, ptr %416, i64 %418
  invoke void @_ZSt9make_pairISt4pairIxxERxES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair.15") align 8 %42, ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(8) %419)
          to label %420 unwind label %466

420:                                              ; preds = %412
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %41, ptr noundef nonnull align 8 dereferenceable(24) %42)
          to label %421 unwind label %466

421:                                              ; preds = %420
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %42) #9
  %422 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 0
  %423 = load i64, ptr %422, align 8, !tbaa !19
  %424 = mul nsw i64 %423, %81
  %425 = getelementptr inbounds i64, ptr %83, i64 %424
  %426 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 1
  %427 = load i64, ptr %426, align 8, !tbaa !21
  %428 = getelementptr inbounds i64, ptr %425, i64 %427
  %429 = load i64, ptr %428, align 8, !tbaa !8
  %430 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %429) #9
  %431 = getelementptr inbounds %struct.dat, ptr %430, i32 0, i32 1
  store i64 0, ptr %431, align 8, !tbaa !29
  %432 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 0
  %433 = load i64, ptr %432, align 8, !tbaa !19
  %434 = mul nsw i64 %433, %81
  %435 = getelementptr inbounds i64, ptr %83, i64 %434
  %436 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 1
  %437 = load i64, ptr %436, align 8, !tbaa !21
  %438 = getelementptr inbounds i64, ptr %435, i64 %437
  %439 = load i64, ptr %438, align 8, !tbaa !8
  %440 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %439) #9
  %441 = getelementptr inbounds %struct.dat, ptr %440, i32 0, i32 2
  store i64 1, ptr %441, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #9
  store i64 1, ptr %46, align 8, !tbaa !8
  br label %442

442:                                              ; preds = %687, %685, %421
  %443 = invoke noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %41)
          to label %444 unwind label %470

444:                                              ; preds = %442
  %445 = xor i1 %443, true
  br i1 %445, label %446, label %690

446:                                              ; preds = %444
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #9
  %447 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %41)
          to label %448 unwind label %474

448:                                              ; preds = %446
  %449 = getelementptr inbounds %"struct.std::pair.15", ptr %447, i32 0, i32 0
  %450 = getelementptr inbounds %"struct.std::pair", ptr %449, i32 0, i32 0
  %451 = load i64, ptr %450, align 8, !tbaa !31
  store i64 %451, ptr %47, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #9
  %452 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %41)
          to label %453 unwind label %478

453:                                              ; preds = %448
  %454 = getelementptr inbounds %"struct.std::pair.15", ptr %452, i32 0, i32 1
  %455 = load i64, ptr %454, align 8, !tbaa !33
  store i64 %455, ptr %48, align 8, !tbaa !8
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %41)
          to label %456 unwind label %478

456:                                              ; preds = %453
  %457 = load i64, ptr %48, align 8, !tbaa !8
  %458 = getelementptr inbounds [900 x i8], ptr @vis, i64 0, i64 %457
  %459 = load i8, ptr %458, align 1, !tbaa !34, !range !35, !noundef !36
  %460 = trunc i8 %459 to i1
  br i1 %460, label %461, label %482

461:                                              ; preds = %456
  store i32 26, ptr %10, align 4
  br label %685, !llvm.loop !37

462:                                              ; preds = %410
  %463 = landingpad { ptr, i32 }
          cleanup
  %464 = extractvalue { ptr, i32 } %463, 0
  store ptr %464, ptr %20, align 8
  %465 = extractvalue { ptr, i32 } %463, 1
  store i32 %465, ptr %21, align 4
  br label %864

466:                                              ; preds = %420, %412, %411
  %467 = landingpad { ptr, i32 }
          cleanup
  %468 = extractvalue { ptr, i32 } %467, 0
  store ptr %468, ptr %20, align 8
  %469 = extractvalue { ptr, i32 } %467, 1
  store i32 %469, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %42) #9
  br label %863

470:                                              ; preds = %856, %854, %851, %838, %836, %823, %442
  %471 = landingpad { ptr, i32 }
          cleanup
  %472 = extractvalue { ptr, i32 } %471, 0
  store ptr %472, ptr %20, align 8
  %473 = extractvalue { ptr, i32 } %471, 1
  store i32 %473, ptr %21, align 4
  br label %862

474:                                              ; preds = %446
  %475 = landingpad { ptr, i32 }
          cleanup
  %476 = extractvalue { ptr, i32 } %475, 0
  store ptr %476, ptr %20, align 8
  %477 = extractvalue { ptr, i32 } %475, 1
  store i32 %477, ptr %21, align 4
  br label %689

478:                                              ; preds = %453, %448
  %479 = landingpad { ptr, i32 }
          cleanup
  %480 = extractvalue { ptr, i32 } %479, 0
  store ptr %480, ptr %20, align 8
  %481 = extractvalue { ptr, i32 } %479, 1
  store i32 %481, ptr %21, align 4
  br label %688

482:                                              ; preds = %456
  %483 = load i64, ptr %48, align 8, !tbaa !8
  %484 = getelementptr inbounds [900 x i8], ptr @vis, i64 0, i64 %483
  store i8 1, ptr %484, align 1, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #9
  %485 = load i64, ptr %48, align 8, !tbaa !8
  %486 = getelementptr inbounds %"class.std::set", ptr %310, i64 %485
  store ptr %486, ptr %49, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #9
  %487 = load ptr, ptr %49, align 8, !tbaa !23
  %488 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %487) #9
  %489 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %50, i32 0, i32 0
  store ptr %488, ptr %489, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #9
  %490 = load ptr, ptr %49, align 8, !tbaa !23
  %491 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %490) #9
  %492 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %51, i32 0, i32 0
  store ptr %491, ptr %492, align 8
  br label %493

493:                                              ; preds = %681, %482
  %494 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %51) #9
  br i1 %494, label %496, label %495

495:                                              ; preds = %493
  store i32 28, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  br label %684

496:                                              ; preds = %493
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #9
  %497 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #9
  %498 = load i64, ptr %497, align 8, !tbaa !8
  store i64 %498, ptr %52, align 8, !tbaa !8
  %499 = load i64, ptr %52, align 8, !tbaa !8
  %500 = load i64, ptr %48, align 8, !tbaa !8
  %501 = icmp eq i64 %499, %500
  br i1 %501, label %502, label %503

502:                                              ; preds = %496
  store i32 29, ptr %10, align 4
  br label %678

503:                                              ; preds = %496
  %504 = load i64, ptr %52, align 8, !tbaa !8
  %505 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %504) #9
  %506 = getelementptr inbounds %struct.dat, ptr %505, i32 0, i32 0
  %507 = load i8, ptr %506, align 8, !tbaa !16, !range !35, !noundef !36
  %508 = trunc i8 %507 to i1
  br i1 %508, label %509, label %575

509:                                              ; preds = %503
  %510 = load i64, ptr %52, align 8, !tbaa !8
  %511 = getelementptr inbounds [900 x [900 x i8]], ptr @vis2, i64 0, i64 %510
  %512 = load i64, ptr %48, align 8, !tbaa !8
  %513 = getelementptr inbounds [900 x i8], ptr %511, i64 0, i64 %512
  %514 = load i8, ptr %513, align 1, !tbaa !34, !range !35, !noundef !36
  %515 = trunc i8 %514 to i1
  br i1 %515, label %516, label %517

516:                                              ; preds = %509
  store i32 29, ptr %10, align 4
  br label %678

517:                                              ; preds = %509
  %518 = load i64, ptr %52, align 8, !tbaa !8
  %519 = getelementptr inbounds [900 x [900 x i8]], ptr @vis2, i64 0, i64 %518
  %520 = load i64, ptr %48, align 8, !tbaa !8
  %521 = getelementptr inbounds [900 x i8], ptr %519, i64 0, i64 %520
  store i8 1, ptr %521, align 1, !tbaa !34
  %522 = load i64, ptr %52, align 8, !tbaa !8
  %523 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %522) #9
  %524 = getelementptr inbounds %struct.dat, ptr %523, i32 0, i32 1
  %525 = load i64, ptr %524, align 8, !tbaa !29
  %526 = icmp eq i64 %525, 2147483647
  br i1 %526, label %527, label %552

527:                                              ; preds = %517
  %528 = load i64, ptr %48, align 8, !tbaa !8
  %529 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %528) #9
  %530 = getelementptr inbounds %struct.dat, ptr %529, i32 0, i32 2
  %531 = load i64, ptr %530, align 8, !tbaa !30
  %532 = load i64, ptr %52, align 8, !tbaa !8
  %533 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %532) #9
  %534 = getelementptr inbounds %struct.dat, ptr %533, i32 0, i32 2
  store i64 %531, ptr %534, align 8, !tbaa !30
  %535 = load i64, ptr %48, align 8, !tbaa !8
  %536 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %535) #9
  %537 = getelementptr inbounds %struct.dat, ptr %536, i32 0, i32 1
  %538 = load i64, ptr %537, align 8, !tbaa !29
  %539 = add nsw i64 %538, 1
  %540 = load i64, ptr %52, align 8, !tbaa !8
  %541 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %540) #9
  %542 = getelementptr inbounds %struct.dat, ptr %541, i32 0, i32 1
  store i64 %539, ptr %542, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 24, ptr %53) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %54) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #9
  %543 = load i64, ptr %47, align 8, !tbaa !8
  %544 = add nsw i64 %543, 1
  store i64 %544, ptr %55, align 8, !tbaa !8
  invoke void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %545 unwind label %548

545:                                              ; preds = %527
  invoke void @_ZSt9make_pairISt4pairIxxERxES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair.15") align 8 %53, ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull align 8 dereferenceable(8) %52)
          to label %546 unwind label %548

546:                                              ; preds = %545
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %41, ptr noundef nonnull align 8 dereferenceable(24) %53)
          to label %547 unwind label %548

547:                                              ; preds = %546
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %53) #9
  br label %574

548:                                              ; preds = %546, %545, %527
  %549 = landingpad { ptr, i32 }
          cleanup
  %550 = extractvalue { ptr, i32 } %549, 0
  store ptr %550, ptr %20, align 8
  %551 = extractvalue { ptr, i32 } %549, 1
  store i32 %551, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %53) #9
  br label %683

552:                                              ; preds = %517
  %553 = load i64, ptr %52, align 8, !tbaa !8
  %554 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %553) #9
  %555 = getelementptr inbounds %struct.dat, ptr %554, i32 0, i32 1
  %556 = load i64, ptr %555, align 8, !tbaa !29
  %557 = load i64, ptr %48, align 8, !tbaa !8
  %558 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %557) #9
  %559 = getelementptr inbounds %struct.dat, ptr %558, i32 0, i32 1
  %560 = load i64, ptr %559, align 8, !tbaa !29
  %561 = add nsw i64 %560, 1
  %562 = icmp eq i64 %556, %561
  br i1 %562, label %563, label %573

563:                                              ; preds = %552
  %564 = load i64, ptr %48, align 8, !tbaa !8
  %565 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %564) #9
  %566 = getelementptr inbounds %struct.dat, ptr %565, i32 0, i32 2
  %567 = load i64, ptr %566, align 8, !tbaa !30
  %568 = load i64, ptr %52, align 8, !tbaa !8
  %569 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %568) #9
  %570 = getelementptr inbounds %struct.dat, ptr %569, i32 0, i32 2
  %571 = load i64, ptr %570, align 8, !tbaa !30
  %572 = add nsw i64 %571, %567
  store i64 %572, ptr %570, align 8, !tbaa !30
  br label %573

573:                                              ; preds = %563, %552
  br label %574

574:                                              ; preds = %573, %547
  br label %675

575:                                              ; preds = %503
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #9
  %576 = load i64, ptr %52, align 8, !tbaa !8
  %577 = getelementptr inbounds %"class.std::set", ptr %310, i64 %576
  store ptr %577, ptr %56, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #9
  %578 = load ptr, ptr %56, align 8, !tbaa !23
  %579 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %578) #9
  %580 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %57, i32 0, i32 0
  store ptr %579, ptr %580, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #9
  %581 = load ptr, ptr %56, align 8, !tbaa !23
  %582 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %581) #9
  %583 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %58, i32 0, i32 0
  store ptr %582, ptr %583, align 8
  br label %584

584:                                              ; preds = %672, %575
  %585 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %58) #9
  br i1 %585, label %587, label %586

586:                                              ; preds = %584
  store i32 30, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #9
  br label %674

587:                                              ; preds = %584
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #9
  %588 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #9
  %589 = load i64, ptr %588, align 8, !tbaa !8
  store i64 %589, ptr %59, align 8, !tbaa !8
  %590 = load i64, ptr %59, align 8, !tbaa !8
  %591 = getelementptr inbounds [900 x [900 x i8]], ptr @vis2, i64 0, i64 %590
  %592 = load i64, ptr %48, align 8, !tbaa !8
  %593 = getelementptr inbounds [900 x i8], ptr %591, i64 0, i64 %592
  %594 = load i8, ptr %593, align 1, !tbaa !34, !range !35, !noundef !36
  %595 = trunc i8 %594 to i1
  br i1 %595, label %596, label %597

596:                                              ; preds = %587
  store i32 31, ptr %10, align 4
  br label %669

597:                                              ; preds = %587
  %598 = load i64, ptr %59, align 8, !tbaa !8
  %599 = getelementptr inbounds [900 x [900 x i8]], ptr @vis2, i64 0, i64 %598
  %600 = load i64, ptr %48, align 8, !tbaa !8
  %601 = getelementptr inbounds [900 x i8], ptr %599, i64 0, i64 %600
  store i8 1, ptr %601, align 1, !tbaa !34
  %602 = load i64, ptr %59, align 8, !tbaa !8
  %603 = load i64, ptr %48, align 8, !tbaa !8
  %604 = icmp eq i64 %602, %603
  br i1 %604, label %605, label %606

605:                                              ; preds = %597
  store i32 31, ptr %10, align 4
  br label %669

606:                                              ; preds = %597
  %607 = load i64, ptr %59, align 8, !tbaa !8
  %608 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %607) #9
  %609 = getelementptr inbounds %struct.dat, ptr %608, i32 0, i32 0
  %610 = load i8, ptr %609, align 8, !tbaa !16, !range !35, !noundef !36
  %611 = trunc i8 %610 to i1
  br i1 %611, label %612, label %666

612:                                              ; preds = %606
  %613 = load i64, ptr %59, align 8, !tbaa !8
  %614 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %613) #9
  %615 = getelementptr inbounds %struct.dat, ptr %614, i32 0, i32 1
  %616 = load i64, ptr %615, align 8, !tbaa !29
  %617 = icmp eq i64 %616, 2147483647
  br i1 %617, label %618, label %643

618:                                              ; preds = %612
  %619 = load i64, ptr %48, align 8, !tbaa !8
  %620 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %619) #9
  %621 = getelementptr inbounds %struct.dat, ptr %620, i32 0, i32 2
  %622 = load i64, ptr %621, align 8, !tbaa !30
  %623 = load i64, ptr %59, align 8, !tbaa !8
  %624 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %623) #9
  %625 = getelementptr inbounds %struct.dat, ptr %624, i32 0, i32 2
  store i64 %622, ptr %625, align 8, !tbaa !30
  %626 = load i64, ptr %48, align 8, !tbaa !8
  %627 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %626) #9
  %628 = getelementptr inbounds %struct.dat, ptr %627, i32 0, i32 1
  %629 = load i64, ptr %628, align 8, !tbaa !29
  %630 = add nsw i64 %629, 1
  %631 = load i64, ptr %59, align 8, !tbaa !8
  %632 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %631) #9
  %633 = getelementptr inbounds %struct.dat, ptr %632, i32 0, i32 1
  store i64 %630, ptr %633, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 24, ptr %60) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %61) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #9
  %634 = load i64, ptr %47, align 8, !tbaa !8
  %635 = add nsw i64 %634, 1
  store i64 %635, ptr %62, align 8, !tbaa !8
  invoke void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %636 unwind label %639

636:                                              ; preds = %618
  invoke void @_ZSt9make_pairISt4pairIxxERxES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair.15") align 8 %60, ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(8) %59)
          to label %637 unwind label %639

637:                                              ; preds = %636
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %41, ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %638 unwind label %639

638:                                              ; preds = %637
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %61) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %60) #9
  br label %665

639:                                              ; preds = %637, %636, %618
  %640 = landingpad { ptr, i32 }
          cleanup
  %641 = extractvalue { ptr, i32 } %640, 0
  store ptr %641, ptr %20, align 8
  %642 = extractvalue { ptr, i32 } %640, 1
  store i32 %642, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %61) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #9
  br label %683

643:                                              ; preds = %612
  %644 = load i64, ptr %59, align 8, !tbaa !8
  %645 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %644) #9
  %646 = getelementptr inbounds %struct.dat, ptr %645, i32 0, i32 1
  %647 = load i64, ptr %646, align 8, !tbaa !29
  %648 = load i64, ptr %48, align 8, !tbaa !8
  %649 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %648) #9
  %650 = getelementptr inbounds %struct.dat, ptr %649, i32 0, i32 1
  %651 = load i64, ptr %650, align 8, !tbaa !29
  %652 = add nsw i64 %651, 1
  %653 = icmp eq i64 %647, %652
  br i1 %653, label %654, label %664

654:                                              ; preds = %643
  %655 = load i64, ptr %48, align 8, !tbaa !8
  %656 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %655) #9
  %657 = getelementptr inbounds %struct.dat, ptr %656, i32 0, i32 2
  %658 = load i64, ptr %657, align 8, !tbaa !30
  %659 = load i64, ptr %59, align 8, !tbaa !8
  %660 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %659) #9
  %661 = getelementptr inbounds %struct.dat, ptr %660, i32 0, i32 2
  %662 = load i64, ptr %661, align 8, !tbaa !30
  %663 = add nsw i64 %662, %658
  store i64 %663, ptr %661, align 8, !tbaa !30
  br label %664

664:                                              ; preds = %654, %643
  br label %665

665:                                              ; preds = %664, %638
  br label %666

666:                                              ; preds = %665, %606
  %667 = load i64, ptr %46, align 8, !tbaa !8
  %668 = add nsw i64 %667, 1
  store i64 %668, ptr %46, align 8, !tbaa !8
  store i32 0, ptr %10, align 4
  br label %669

669:                                              ; preds = %666, %605, %596
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #9
  %670 = load i32, ptr %10, align 4
  switch i32 %670, label %886 [
    i32 0, label %671
    i32 31, label %672
  ]

671:                                              ; preds = %669
  br label %672

672:                                              ; preds = %671, %669
  %673 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #9
  br label %584

674:                                              ; preds = %586
  br label %675

675:                                              ; preds = %674, %574
  %676 = load i64, ptr %46, align 8, !tbaa !8
  %677 = add nsw i64 %676, 1
  store i64 %677, ptr %46, align 8, !tbaa !8
  store i32 0, ptr %10, align 4
  br label %678

678:                                              ; preds = %675, %516, %502
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #9
  %679 = load i32, ptr %10, align 4
  switch i32 %679, label %886 [
    i32 0, label %680
    i32 29, label %681
  ]

680:                                              ; preds = %678
  br label %681

681:                                              ; preds = %680, %678
  %682 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #9
  br label %493

683:                                              ; preds = %639, %548
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  br label %688

684:                                              ; preds = %495
  store i32 0, ptr %10, align 4
  br label %685

685:                                              ; preds = %684, %461
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  %686 = load i32, ptr %10, align 4
  switch i32 %686, label %886 [
    i32 0, label %687
    i32 26, label %442
  ]

687:                                              ; preds = %685
  br label %442, !llvm.loop !37

688:                                              ; preds = %683, %478
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #9
  br label %689

689:                                              ; preds = %688, %474
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  br label %862

690:                                              ; preds = %444
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #9
  %691 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %692 = load i64, ptr %691, align 8, !tbaa !19
  %693 = mul nsw i64 %692, %81
  %694 = getelementptr inbounds i64, ptr %83, i64 %693
  %695 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %696 = load i64, ptr %695, align 8, !tbaa !21
  %697 = getelementptr inbounds i64, ptr %694, i64 %696
  %698 = load i64, ptr %697, align 8, !tbaa !8
  %699 = getelementptr inbounds %"class.std::set", ptr %310, i64 %698
  store ptr %699, ptr %63, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #9
  %700 = load ptr, ptr %63, align 8, !tbaa !23
  %701 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %700) #9
  %702 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %64, i32 0, i32 0
  store ptr %701, ptr %702, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #9
  %703 = load ptr, ptr %63, align 8, !tbaa !23
  %704 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %703) #9
  %705 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %65, i32 0, i32 0
  store ptr %704, ptr %705, align 8
  br label %706

706:                                              ; preds = %808, %690
  %707 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %65) #9
  br i1 %707, label %709, label %708

708:                                              ; preds = %706
  store i32 32, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #9
  br label %810

709:                                              ; preds = %706
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #9
  %710 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %64) #9
  %711 = load i64, ptr %710, align 8, !tbaa !8
  %712 = trunc i64 %711 to i32
  store i32 %712, ptr %66, align 4, !tbaa !14
  %713 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %714 = load i64, ptr %713, align 8, !tbaa !19
  %715 = mul nsw i64 %714, %81
  %716 = getelementptr inbounds i64, ptr %83, i64 %715
  %717 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %718 = load i64, ptr %717, align 8, !tbaa !21
  %719 = getelementptr inbounds i64, ptr %716, i64 %718
  %720 = load i64, ptr %719, align 8, !tbaa !8
  %721 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %720) #9
  %722 = getelementptr inbounds %struct.dat, ptr %721, i32 0, i32 1
  %723 = load i64, ptr %722, align 8, !tbaa !29
  %724 = load i32, ptr %66, align 4, !tbaa !14
  %725 = sext i32 %724 to i64
  %726 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %725) #9
  %727 = getelementptr inbounds %struct.dat, ptr %726, i32 0, i32 1
  %728 = load i64, ptr %727, align 8, !tbaa !29
  %729 = icmp slt i64 %723, %728
  br i1 %729, label %742, label %730

730:                                              ; preds = %709
  %731 = load i32, ptr %66, align 4, !tbaa !14
  %732 = sext i32 %731 to i64
  %733 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %734 = load i64, ptr %733, align 8, !tbaa !19
  %735 = mul nsw i64 %734, %81
  %736 = getelementptr inbounds i64, ptr %83, i64 %735
  %737 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %738 = load i64, ptr %737, align 8, !tbaa !21
  %739 = getelementptr inbounds i64, ptr %736, i64 %738
  %740 = load i64, ptr %739, align 8, !tbaa !8
  %741 = icmp eq i64 %732, %740
  br i1 %741, label %742, label %743

742:                                              ; preds = %730, %709
  store i32 33, ptr %10, align 4
  br label %805

743:                                              ; preds = %730
  %744 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %745 = load i64, ptr %744, align 8, !tbaa !19
  %746 = mul nsw i64 %745, %81
  %747 = getelementptr inbounds i64, ptr %83, i64 %746
  %748 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %749 = load i64, ptr %748, align 8, !tbaa !21
  %750 = getelementptr inbounds i64, ptr %747, i64 %749
  %751 = load i64, ptr %750, align 8, !tbaa !8
  %752 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %751) #9
  %753 = getelementptr inbounds %struct.dat, ptr %752, i32 0, i32 1
  %754 = load i64, ptr %753, align 8, !tbaa !29
  %755 = load i32, ptr %66, align 4, !tbaa !14
  %756 = sext i32 %755 to i64
  %757 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %756) #9
  %758 = getelementptr inbounds %struct.dat, ptr %757, i32 0, i32 1
  %759 = load i64, ptr %758, align 8, !tbaa !29
  %760 = icmp sgt i64 %754, %759
  br i1 %760, label %761, label %772

761:                                              ; preds = %743
  %762 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %763 = load i64, ptr %762, align 8, !tbaa !19
  %764 = mul nsw i64 %763, %81
  %765 = getelementptr inbounds i64, ptr %83, i64 %764
  %766 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %767 = load i64, ptr %766, align 8, !tbaa !21
  %768 = getelementptr inbounds i64, ptr %765, i64 %767
  %769 = load i64, ptr %768, align 8, !tbaa !8
  %770 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %769) #9
  %771 = getelementptr inbounds %struct.dat, ptr %770, i32 0, i32 2
  store i64 0, ptr %771, align 8, !tbaa !30
  br label %772

772:                                              ; preds = %761, %743
  %773 = load i32, ptr %66, align 4, !tbaa !14
  %774 = sext i32 %773 to i64
  %775 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %774) #9
  %776 = getelementptr inbounds %struct.dat, ptr %775, i32 0, i32 1
  %777 = load i64, ptr %776, align 8, !tbaa !29
  %778 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %779 = load i64, ptr %778, align 8, !tbaa !19
  %780 = mul nsw i64 %779, %81
  %781 = getelementptr inbounds i64, ptr %83, i64 %780
  %782 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %783 = load i64, ptr %782, align 8, !tbaa !21
  %784 = getelementptr inbounds i64, ptr %781, i64 %783
  %785 = load i64, ptr %784, align 8, !tbaa !8
  %786 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %785) #9
  %787 = getelementptr inbounds %struct.dat, ptr %786, i32 0, i32 1
  store i64 %777, ptr %787, align 8, !tbaa !29
  %788 = load i32, ptr %66, align 4, !tbaa !14
  %789 = sext i32 %788 to i64
  %790 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %789) #9
  %791 = getelementptr inbounds %struct.dat, ptr %790, i32 0, i32 2
  %792 = load i64, ptr %791, align 8, !tbaa !30
  %793 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %794 = load i64, ptr %793, align 8, !tbaa !19
  %795 = mul nsw i64 %794, %81
  %796 = getelementptr inbounds i64, ptr %83, i64 %795
  %797 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %798 = load i64, ptr %797, align 8, !tbaa !21
  %799 = getelementptr inbounds i64, ptr %796, i64 %798
  %800 = load i64, ptr %799, align 8, !tbaa !8
  %801 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %800) #9
  %802 = getelementptr inbounds %struct.dat, ptr %801, i32 0, i32 2
  %803 = load i64, ptr %802, align 8, !tbaa !30
  %804 = add nsw i64 %803, %792
  store i64 %804, ptr %802, align 8, !tbaa !30
  store i32 0, ptr %10, align 4
  br label %805

805:                                              ; preds = %772, %742
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  %806 = load i32, ptr %10, align 4
  switch i32 %806, label %886 [
    i32 0, label %807
    i32 33, label %808
  ]

807:                                              ; preds = %805
  br label %808

808:                                              ; preds = %807, %805
  %809 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %64) #9
  br label %706

810:                                              ; preds = %708
  %811 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %812 = load i64, ptr %811, align 8, !tbaa !19
  %813 = mul nsw i64 %812, %81
  %814 = getelementptr inbounds i64, ptr %83, i64 %813
  %815 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %816 = load i64, ptr %815, align 8, !tbaa !21
  %817 = getelementptr inbounds i64, ptr %814, i64 %816
  %818 = load i64, ptr %817, align 8, !tbaa !8
  %819 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %818) #9
  %820 = getelementptr inbounds %struct.dat, ptr %819, i32 0, i32 1
  %821 = load i64, ptr %820, align 8, !tbaa !29
  %822 = icmp ne i64 %821, 2147483647
  br i1 %822, label %823, label %854

823:                                              ; preds = %810
  %824 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %825 = load i64, ptr %824, align 8, !tbaa !19
  %826 = mul nsw i64 %825, %81
  %827 = getelementptr inbounds i64, ptr %83, i64 %826
  %828 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %829 = load i64, ptr %828, align 8, !tbaa !21
  %830 = getelementptr inbounds i64, ptr %827, i64 %829
  %831 = load i64, ptr %830, align 8, !tbaa !8
  %832 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %831) #9
  %833 = getelementptr inbounds %struct.dat, ptr %832, i32 0, i32 1
  %834 = load i64, ptr %833, align 8, !tbaa !29
  %835 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %834)
          to label %836 unwind label %470

836:                                              ; preds = %823
  %837 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %835, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %838 unwind label %470

838:                                              ; preds = %836
  %839 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %840 = load i64, ptr %839, align 8, !tbaa !19
  %841 = mul nsw i64 %840, %81
  %842 = getelementptr inbounds i64, ptr %83, i64 %841
  %843 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %844 = load i64, ptr %843, align 8, !tbaa !21
  %845 = getelementptr inbounds i64, ptr %842, i64 %844
  %846 = load i64, ptr %845, align 8, !tbaa !8
  %847 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %846) #9
  %848 = getelementptr inbounds %struct.dat, ptr %847, i32 0, i32 2
  %849 = load i64, ptr %848, align 8, !tbaa !30
  %850 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %849)
          to label %851 unwind label %470

851:                                              ; preds = %838
  %852 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %850, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %853 unwind label %470

853:                                              ; preds = %851
  br label %859

854:                                              ; preds = %810
  %855 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %856 unwind label %470

856:                                              ; preds = %854
  %857 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %855, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %858 unwind label %470

858:                                              ; preds = %856
  br label %859

859:                                              ; preds = %858, %853
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  call void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %41) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #9
  %860 = getelementptr inbounds %"class.std::set", ptr %310, i64 %309
  %861 = icmp eq ptr %310, %860
  br i1 %861, label %869, label %865

862:                                              ; preds = %689, %470
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  br label %863

863:                                              ; preds = %862, %466
  call void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %41) #9
  br label %864

864:                                              ; preds = %863, %462
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #9
  br label %872

865:                                              ; preds = %865, %859
  %866 = phi ptr [ %860, %859 ], [ %867, %865 ]
  %867 = getelementptr inbounds %"class.std::set", ptr %866, i64 -1
  call void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %867) #9
  %868 = icmp eq ptr %867, %310
  br i1 %868, label %869, label %865

869:                                              ; preds = %865, %859
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @_ZNSt6vectorI3datSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  %870 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %870)
  %871 = load i32, ptr %1, align 4
  ret i32 %871

872:                                              ; preds = %864, %405
  %873 = getelementptr inbounds %"class.std::set", ptr %310, i64 %309
  %874 = icmp eq ptr %310, %873
  br i1 %874, label %879, label %875

875:                                              ; preds = %875, %872
  %876 = phi ptr [ %873, %872 ], [ %877, %875 ]
  %877 = getelementptr inbounds %"class.std::set", ptr %876, i64 -1
  call void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %877) #9
  %878 = icmp eq ptr %877, %310
  br i1 %878, label %879, label %875

879:                                              ; preds = %875, %872
  br label %880

880:                                              ; preds = %879, %303
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @_ZNSt6vectorI3datSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  br label %881

881:                                              ; preds = %880
  %882 = load ptr, ptr %20, align 8
  %883 = load i32, ptr %21, align 4
  %884 = insertvalue { ptr, i32 } poison, ptr %882, 0
  %885 = insertvalue { ptr, i32 } %884, i32 %883, 1
  resume { ptr, i32 } %885

886:                                              ; preds = %805, %685, %678, %669, %392, %295, %286
  unreachable
}

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI3datSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 uwtable
declare dso_local void @_ZNSt6vectorI3datSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 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)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairISt4pairIxxERxES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.15") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind willreturn }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { 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 = !{!17, !18, i64 0}
!17 = !{!"_ZTS3dat", !18, i64 0, !9, i64 8, !9, i64 16}
!18 = !{!"bool", !10, i64 0}
!19 = !{!20, !9, i64 0}
!20 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!21 = !{!20, !9, i64 8}
!22 = distinct !{!22, !12}
!23 = !{!24, !24, i64 0}
!24 = !{!"any pointer", !10, i64 0}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = !{!17, !9, i64 8}
!30 = !{!17, !9, i64 16}
!31 = !{!32, !9, i64 0}
!32 = !{!"_ZTSSt4pairIS_IxxExE", !20, i64 0, !9, i64 16}
!33 = !{!32, !9, i64 16}
!34 = !{!18, !18, i64 0}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = distinct !{!37, !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::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 }
%struct.dat = type { i8, i64, i64 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = 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" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<dat, std::allocator<dat>>::_Vector_impl" }
%"struct.std::_Vector_base<dat, std::allocator<dat>>::_Vector_impl" = type { %"struct.std::_Vector_base<dat, std::allocator<dat>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dat, std::allocator<dat>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, 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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector.10", [8 x i8] }>
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, long long>, std::allocator<std::pair<std::pair<long long, long long>, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, long long>, std::allocator<std::pair<std::pair<long long, long long>, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, long long>, std::allocator<std::pair<std::pair<long long, long long>, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, long long>, std::allocator<std::pair<std::pair<long long, long long>, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.15" = type { %"struct.std::pair", i64 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@M = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@vis = external dso_local local_unnamed_addr global [900 x i8], align 16
@vis2 = external dso_local local_unnamed_addr global [900 x [900 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@__const.main.t = external hidden unnamed_addr constant %struct.dat, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7genLocsSt4pairIxxE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64, i64) local_unnamed_addr #0

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca [0 x %"class.std::set"], align 16
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %struct.dat, align 8
  %13 = alloca %"class.std::stack", align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca %"class.std::vector", align 8
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.std::priority_queue", align 8
  %26 = alloca %"struct.std::pair.15", align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i64, align 8
  %31 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %32 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %33 = alloca i64, align 8
  %34 = alloca %"struct.std::pair.15", align 8
  %35 = alloca %"struct.std::pair", align 8
  %36 = alloca i64, align 8
  %37 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %38 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %39 = alloca i64, align 8
  %40 = alloca %"struct.std::pair.15", align 8
  %41 = alloca %"struct.std::pair", align 8
  %42 = alloca i64, align 8
  %43 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %44 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %45 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %46 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %47 = getelementptr i8, ptr %46, i64 -24
  %48 = load i64, ptr %47, align 8
  %49 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %48
  %50 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %49, ptr noundef null)
  %51 = 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) @M)
  %52 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %53 = load i64, ptr @M, align 8, !tbaa !8
  %54 = load i64, ptr @N, align 8, !tbaa !8
  %55 = mul nuw i64 %54, %53
  %56 = alloca i64, i64 %55, align 16
  %57 = alloca i64, i64 %55, align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #8
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store i64 0, ptr %4, align 8, !tbaa !8
  %58 = load i64, ptr @M, align 8, !tbaa !8
  %59 = icmp sgt i64 %58, 0
  %.pre162 = load i64, ptr @N, align 8, !tbaa !8
  %60 = icmp sgt i64 %.pre162, 0
  %or.cond = select i1 %59, i1 %60, i1 false
  br i1 %or.cond, label %.lr.ph113.split, label %._crit_edge114

._crit_edge114:                                   ; preds = %._crit_edge, %0
  %61 = phi i64 [ %.pre162, %0 ], [ %77, %._crit_edge ]
  %.lcssa = phi i64 [ %58, %0 ], [ %75, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %62 = add nsw i64 %.lcssa, -1
  %63 = mul nsw i64 %62, %54
  %64 = getelementptr inbounds i64, ptr %57, i64 %63
  %65 = getelementptr inbounds i64, ptr %64, i64 %61
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 -1, ptr %8, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %57, ptr noundef nonnull %65, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  call void @_ZNSt6vectorI3datSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store i64 0, ptr %10, align 8, !tbaa !8
  %66 = load i64, ptr @M, align 8, !tbaa !8
  %67 = icmp sgt i64 %66, 0
  br i1 %67, label %.lr.ph130, label %._crit_edge131.thread

.lr.ph130:                                        ; preds = %._crit_edge114
  %68 = getelementptr inbounds i8, ptr %18, i64 8
  %69 = load i64, ptr @N, align 8, !tbaa !8
  %70 = icmp sgt i64 %69, 0
  br i1 %70, label %.lr.ph130.split, label %._crit_edge131.thread

.lr.ph113.split:                                  ; preds = %0, %._crit_edge
  %71 = phi i64 [ %75, %._crit_edge ], [ %58, %0 ]
  %72 = phi i64 [ %78, %._crit_edge ], [ 0, %0 ]
  %73 = phi i64 [ %77, %._crit_edge ], [ %.pre162, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store i64 0, ptr %5, align 8, !tbaa !8
  %74 = icmp sgt i64 %73, 0
  br i1 %74, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %113
  %.pre = load i64, ptr @M, align 8, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph113.split
  %75 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %71, %.lr.ph113.split ]
  %76 = phi i64 [ %115, %._crit_edge.loopexit ], [ %72, %.lr.ph113.split ]
  %77 = phi i64 [ %117, %._crit_edge.loopexit ], [ %73, %.lr.ph113.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %78 = add nsw i64 %76, 1
  store i64 %78, ptr %4, align 8, !tbaa !8
  %79 = icmp slt i64 %78, %75
  br i1 %79, label %.lr.ph113.split, label %._crit_edge114, !llvm.loop !13

.lr.ph:                                           ; preds = %.lr.ph113.split, %113
  %80 = phi i64 [ %115, %113 ], [ %72, %.lr.ph113.split ]
  %storemerge95111 = phi i64 [ %116, %113 ], [ 0, %.lr.ph113.split ]
  %81 = mul nsw i64 %80, %54
  %82 = getelementptr inbounds i64, ptr %56, i64 %81
  %83 = getelementptr inbounds i64, ptr %82, i64 %storemerge95111
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %83)
  %85 = load i64, ptr %4, align 8, !tbaa !8
  %86 = mul nsw i64 %85, %54
  %87 = getelementptr inbounds i64, ptr %56, i64 %86
  %88 = load i64, ptr %5, align 8, !tbaa !8
  %89 = getelementptr inbounds i64, ptr %87, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !8
  %91 = icmp eq i64 %90, 3
  br i1 %91, label %92, label %99

92:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  %94 = load i64, ptr %4, align 8, !tbaa !8
  %95 = mul nsw i64 %94, %54
  %96 = getelementptr inbounds i64, ptr %56, i64 %95
  %97 = load i64, ptr %5, align 8, !tbaa !8
  %98 = getelementptr inbounds i64, ptr %96, i64 %97
  store i64 1, ptr %98, align 8, !tbaa !8
  br label %99

99:                                               ; preds = %92, %.lr.ph
  %.pre-phi = phi i64 [ %95, %92 ], [ %86, %.lr.ph ]
  %100 = phi i64 [ %97, %92 ], [ %88, %.lr.ph ]
  %101 = phi i64 [ %94, %92 ], [ %85, %.lr.ph ]
  %102 = getelementptr inbounds i64, ptr %56, i64 %.pre-phi
  %103 = getelementptr inbounds i64, ptr %102, i64 %100
  %104 = load i64, ptr %103, align 8, !tbaa !8
  %105 = icmp eq i64 %104, 4
  br i1 %105, label %106, label %113

106:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  %108 = load i64, ptr %4, align 8, !tbaa !8
  %109 = mul nsw i64 %108, %54
  %110 = getelementptr inbounds i64, ptr %56, i64 %109
  %111 = load i64, ptr %5, align 8, !tbaa !8
  %112 = getelementptr inbounds i64, ptr %110, i64 %111
  store i64 1, ptr %112, align 8, !tbaa !8
  br label %113

113:                                              ; preds = %99, %106
  %114 = phi i64 [ %100, %99 ], [ %111, %106 ]
  %115 = phi i64 [ %101, %99 ], [ %108, %106 ]
  %116 = add nsw i64 %114, 1
  store i64 %116, ptr %5, align 8, !tbaa !8
  %117 = load i64, ptr @N, align 8, !tbaa !8
  %118 = icmp slt i64 %116, %117
  br i1 %118, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !16

._crit_edge131.thread:                            ; preds = %.lr.ph130, %._crit_edge114
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %.loopexit98

._crit_edge131:                                   ; preds = %._crit_edge126
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %119 = alloca %"class.std::set", i64 %.1.lcssa, align 16
  %120 = icmp eq i64 %.1.lcssa, 0
  br i1 %120, label %.loopexit98, label %198

.lr.ph130.split:                                  ; preds = %.lr.ph130, %._crit_edge126
  %121 = phi i64 [ %126, %._crit_edge126 ], [ %66, %.lr.ph130 ]
  %122 = phi i64 [ %130, %._crit_edge126 ], [ 0, %.lr.ph130 ]
  %123 = phi i64 [ %128, %._crit_edge126 ], [ %69, %.lr.ph130 ]
  %124 = phi i64 [ %129, %._crit_edge126 ], [ %69, %.lr.ph130 ]
  %.0128 = phi i64 [ %.1.lcssa, %._crit_edge126 ], [ 0, %.lr.ph130 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  store i64 0, ptr %11, align 8, !tbaa !8
  %125 = icmp sgt i64 %124, 0
  br i1 %125, label %.lr.ph125, label %._crit_edge126

._crit_edge126.loopexit:                          ; preds = %190
  %.pre165 = load i64, ptr %10, align 8, !tbaa !8
  %.pre166 = load i64, ptr @M, align 8, !tbaa !8
  br label %._crit_edge126

._crit_edge126:                                   ; preds = %._crit_edge126.loopexit, %.lr.ph130.split
  %126 = phi i64 [ %121, %.lr.ph130.split ], [ %.pre166, %._crit_edge126.loopexit ]
  %127 = phi i64 [ %122, %.lr.ph130.split ], [ %.pre165, %._crit_edge126.loopexit ]
  %128 = phi i64 [ %123, %.lr.ph130.split ], [ %191, %._crit_edge126.loopexit ]
  %129 = phi i64 [ %124, %.lr.ph130.split ], [ %191, %._crit_edge126.loopexit ]
  %.1.lcssa = phi i64 [ %.0128, %.lr.ph130.split ], [ %.3, %._crit_edge126.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  %130 = add nsw i64 %127, 1
  store i64 %130, ptr %10, align 8, !tbaa !8
  %131 = icmp slt i64 %130, %126
  br i1 %131, label %.lr.ph130.split, label %._crit_edge131, !llvm.loop !17

.lr.ph125:                                        ; preds = %.lr.ph130.split, %190
  %132 = phi i64 [ %191, %190 ], [ %123, %.lr.ph130.split ]
  %.1123 = phi i64 [ %.3, %190 ], [ %.0128, %.lr.ph130.split ]
  %storemerge86122 = phi i64 [ %193, %190 ], [ 0, %.lr.ph130.split ]
  %133 = load i64, ptr %10, align 8, !tbaa !8
  %134 = mul nsw i64 %133, %54
  %135 = getelementptr inbounds i64, ptr %57, i64 %134
  %136 = getelementptr inbounds i64, ptr %135, i64 %storemerge86122
  %137 = load i64, ptr %136, align 8, !tbaa !8
  %.not87 = icmp eq i64 %137, -1
  br i1 %.not87, label %138, label %190

138:                                              ; preds = %.lr.ph125
  %139 = getelementptr inbounds i64, ptr %56, i64 %134
  %140 = getelementptr inbounds i64, ptr %139, i64 %storemerge86122
  %141 = load i64, ptr %140, align 8, !tbaa !8
  %142 = icmp eq i64 %141, 2
  br i1 %142, label %190, label %143

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) @__const.main.t, i64 24, i1 false)
  %144 = icmp eq i64 %141, 0
  br i1 %144, label %145, label %148

145:                                              ; preds = %143
  store i64 %.1123, ptr %136, align 8, !tbaa !8
  store i8 1, ptr %12, align 8, !tbaa !18
  invoke void @_ZNSt6vectorI3datSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %189 unwind label %146

146:                                              ; preds = %145
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %197

148:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %13) #8
  invoke void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %149 unwind label %158

149:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  invoke void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %150 unwind label %160

150:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  %151 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
  br i1 %151, label %._crit_edge121, label %.lr.ph120

.lr.ph120:                                        ; preds = %150, %185
  %152 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
  %.sroa.037.0.copyload = load i64, ptr %152, align 8
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %152, i64 8
  %.sroa.7.0.copyload = load i64, ptr %.sroa.7.0..sroa_idx, align 8
  call void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
  %153 = mul nsw i64 %.sroa.037.0.copyload, %54
  %154 = getelementptr inbounds i64, ptr %57, i64 %153
  %155 = getelementptr inbounds i64, ptr %154, i64 %.sroa.7.0.copyload
  %156 = load i64, ptr %155, align 8, !tbaa !8
  %157 = icmp eq i64 %156, %.1123
  br i1 %157, label %185, label %164, !llvm.loop !21

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

160:                                              ; preds = %149
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  br label %195

162:                                              ; preds = %._crit_edge121
  %163 = landingpad { ptr, i32 }
          cleanup
  br label %195

164:                                              ; preds = %.lr.ph120
  store i64 %.1123, ptr %155, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #8
  invoke void @_Z7genLocsSt4pairIxxE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %15, i64 %.sroa.037.0.copyload, i64 %.sroa.7.0.copyload)
          to label %165 unwind label %169

165:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %166 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  store ptr %166, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %167 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  store ptr %167, ptr %17, align 8
  %168 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %168, label %.lr.ph117, label %._crit_edge118

._crit_edge118:                                   ; preds = %182, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  br label %185

169:                                              ; preds = %164
  %170 = landingpad { ptr, i32 }
          cleanup
  br label %187

.lr.ph117:                                        ; preds = %165, %182
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #8
  %171 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %171, i64 16, i1 false)
  %172 = load i64, ptr %18, align 8, !tbaa !22
  %173 = mul nsw i64 %172, %54
  %174 = getelementptr inbounds i64, ptr %56, i64 %173
  %175 = load i64, ptr %68, align 8, !tbaa !24
  %176 = getelementptr inbounds i64, ptr %174, i64 %175
  %177 = load i64, ptr %176, align 8, !tbaa !8
  %178 = icmp eq i64 %177, 1
  br i1 %178, label %179, label %182

179:                                              ; preds = %.lr.ph117
  invoke void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %182 unwind label %180

180:                                              ; preds = %179
  %181 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  br label %187

182:                                              ; preds = %179, %.lr.ph117
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %184 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %184, label %.lr.ph117, label %._crit_edge118

185:                                              ; preds = %.lr.ph120, %._crit_edge118
  %186 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
  br i1 %186, label %._crit_edge121, label %.lr.ph120

187:                                              ; preds = %180, %169
  %.pn88 = phi { ptr, i32 } [ %181, %180 ], [ %170, %169 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  br label %195

._crit_edge121:                                   ; preds = %185, %150
  invoke void @_ZNSt6vectorI3datSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %188 unwind label %162

188:                                              ; preds = %._crit_edge121
  call void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %13) #8
  br label %189

189:                                              ; preds = %145, %188
  %.2 = add nsw i64 %.1123, 1
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  %.pre163 = load i64, ptr %11, align 8, !tbaa !8
  %.pre164 = load i64, ptr @N, align 8, !tbaa !8
  br label %190

190:                                              ; preds = %189, %.lr.ph125, %138
  %191 = phi i64 [ %132, %.lr.ph125 ], [ %132, %138 ], [ %.pre164, %189 ]
  %192 = phi i64 [ %storemerge86122, %.lr.ph125 ], [ %storemerge86122, %138 ], [ %.pre163, %189 ]
  %.3 = phi i64 [ %.1123, %.lr.ph125 ], [ %.1123, %138 ], [ %.2, %189 ]
  %193 = add nsw i64 %192, 1
  store i64 %193, ptr %11, align 8, !tbaa !8
  %194 = icmp slt i64 %193, %191
  br i1 %194, label %.lr.ph125, label %._crit_edge126.loopexit, !llvm.loop !25

195:                                              ; preds = %187, %162, %160
  %.pn88.pn = phi { ptr, i32 } [ %.pn88, %187 ], [ %163, %162 ], [ %161, %160 ]
  call void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #8
  br label %196

196:                                              ; preds = %195, %158
  %.pn88.pn.pn = phi { ptr, i32 } [ %.pn88.pn, %195 ], [ %159, %158 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %13) #8
  br label %197

197:                                              ; preds = %196, %146
  %.pn92 = phi { ptr, i32 } [ %147, %146 ], [ %.pn88.pn.pn, %196 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %.loopexit

198:                                              ; preds = %._crit_edge131
  %199 = getelementptr inbounds %"class.std::set", ptr %119, i64 %.1.lcssa
  br label %200

200:                                              ; preds = %200, %198
  %201 = phi ptr [ %119, %198 ], [ %202, %200 ]
  call void @_ZNSt3setIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %201) #8
  %202 = getelementptr inbounds i8, ptr %201, i64 48
  %203 = icmp eq ptr %202, %199
  br i1 %203, label %.loopexit98.loopexit, label %200

.loopexit98.loopexit:                             ; preds = %200
  %.pre167 = load i64, ptr @M, align 8, !tbaa !8
  br label %.loopexit98

.loopexit98:                                      ; preds = %._crit_edge131.thread, %.loopexit98.loopexit, %._crit_edge131
  %204 = phi i1 [ %120, %.loopexit98.loopexit ], [ true, %._crit_edge131 ], [ true, %._crit_edge131.thread ]
  %205 = phi ptr [ %119, %.loopexit98.loopexit ], [ %119, %._crit_edge131 ], [ %1, %._crit_edge131.thread ]
  %.0.lcssa174 = phi i64 [ %.1.lcssa, %.loopexit98.loopexit ], [ 0, %._crit_edge131 ], [ 0, %._crit_edge131.thread ]
  %206 = phi i64 [ %.pre167, %.loopexit98.loopexit ], [ %126, %._crit_edge131 ], [ %66, %._crit_edge131.thread ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  store i64 0, ptr %19, align 8, !tbaa !8
  %207 = icmp sgt i64 %206, 0
  br i1 %207, label %.lr.ph144, label %._crit_edge145

.lr.ph144:                                        ; preds = %.loopexit98
  %208 = getelementptr inbounds i8, ptr %22, i64 8
  %.pre168 = load i64, ptr @N, align 8, !tbaa !8
  br label %215

._crit_edge145:                                   ; preds = %._crit_edge142, %.loopexit98
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %25) #8
  call void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %25)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #8
  store i32 0, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #8
  store i32 0, ptr %29, align 4, !tbaa !11
  call void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %209 = load i64, ptr %2, align 8, !tbaa !22
  %210 = mul nsw i64 %209, %54
  %211 = getelementptr inbounds i64, ptr %57, i64 %210
  %212 = getelementptr inbounds i8, ptr %2, i64 8
  %213 = load i64, ptr %212, align 8, !tbaa !24
  %214 = getelementptr inbounds i64, ptr %211, i64 %213
  invoke void @_ZSt9make_pairISt4pairIxxERxES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.15") align 8 %26, ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %214)
          to label %269 unwind label %297

215:                                              ; preds = %.lr.ph144, %._crit_edge142
  %216 = phi i64 [ %206, %.lr.ph144 ], [ %221, %._crit_edge142 ]
  %217 = phi i64 [ 0, %.lr.ph144 ], [ %225, %._crit_edge142 ]
  %218 = phi i64 [ %.pre168, %.lr.ph144 ], [ %223, %._crit_edge142 ]
  %219 = phi i64 [ %.pre168, %.lr.ph144 ], [ %224, %._crit_edge142 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  store i64 0, ptr %20, align 8, !tbaa !8
  %220 = icmp sgt i64 %219, 0
  br i1 %220, label %.lr.ph141, label %._crit_edge142

._crit_edge142.loopexit:                          ; preds = %263
  %.pre171 = load i64, ptr %19, align 8, !tbaa !8
  %.pre172 = load i64, ptr @M, align 8, !tbaa !8
  br label %._crit_edge142

._crit_edge142:                                   ; preds = %._crit_edge142.loopexit, %215
  %221 = phi i64 [ %.pre172, %._crit_edge142.loopexit ], [ %216, %215 ]
  %222 = phi i64 [ %.pre171, %._crit_edge142.loopexit ], [ %217, %215 ]
  %223 = phi i64 [ %264, %._crit_edge142.loopexit ], [ %218, %215 ]
  %224 = phi i64 [ %264, %._crit_edge142.loopexit ], [ %219, %215 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  %225 = add nsw i64 %222, 1
  store i64 %225, ptr %19, align 8, !tbaa !8
  %226 = icmp slt i64 %225, %221
  br i1 %226, label %215, label %._crit_edge145, !llvm.loop !26

.lr.ph141:                                        ; preds = %215, %263
  %227 = phi i64 [ %264, %263 ], [ %218, %215 ]
  %storemerge82139 = phi i64 [ %266, %263 ], [ 0, %215 ]
  %228 = load i64, ptr %19, align 8, !tbaa !8
  %229 = mul nsw i64 %228, %54
  %230 = getelementptr inbounds i64, ptr %56, i64 %229
  %231 = getelementptr inbounds i64, ptr %230, i64 %storemerge82139
  %232 = load i64, ptr %231, align 8, !tbaa !8
  %233 = icmp eq i64 %232, 2
  br i1 %233, label %263, label %234

234:                                              ; preds = %.lr.ph141
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #8
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %235 = load i64, ptr %22, align 8
  %236 = load i64, ptr %208, align 8
  invoke void @_Z7genLocsSt4pairIxxE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %21, i64 %235, i64 %236)
          to label %237 unwind label %241

237:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #8
  %238 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  store ptr %238, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #8
  %239 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  store ptr %239, ptr %24, align 8
  %240 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br i1 %240, label %.lr.ph137, label %._crit_edge138

._crit_edge138:                                   ; preds = %258, %237
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #8
  %.pre169 = load i64, ptr %20, align 8, !tbaa !8
  %.pre170 = load i64, ptr @N, align 8, !tbaa !8
  br label %263

241:                                              ; preds = %234
  %242 = landingpad { ptr, i32 }
          cleanup
  br label %268

.lr.ph137:                                        ; preds = %237, %258
  %243 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %.sroa.029.0.copyload = load i64, ptr %243, align 8
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %243, i64 8
  %.sroa.6.0.copyload = load i64, ptr %.sroa.6.0..sroa_idx, align 8
  %244 = mul nsw i64 %.sroa.029.0.copyload, %54
  %245 = getelementptr inbounds i64, ptr %57, i64 %244
  %246 = getelementptr inbounds i64, ptr %245, i64 %.sroa.6.0.copyload
  %247 = load i64, ptr %246, align 8, !tbaa !8
  %248 = icmp eq i64 %247, -1
  br i1 %248, label %258, label %249

249:                                              ; preds = %.lr.ph137
  %250 = load i64, ptr %19, align 8, !tbaa !8
  %251 = mul nsw i64 %250, %54
  %252 = getelementptr inbounds i64, ptr %57, i64 %251
  %253 = load i64, ptr %20, align 8, !tbaa !8
  %254 = getelementptr inbounds i64, ptr %252, i64 %253
  %255 = load i64, ptr %254, align 8, !tbaa !8
  %256 = getelementptr inbounds %"class.std::set", ptr %205, i64 %255
  %257 = invoke { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %256, ptr noundef nonnull align 8 dereferenceable(8) %246)
          to label %258 unwind label %261

258:                                              ; preds = %249, %.lr.ph137
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %260 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br i1 %260, label %.lr.ph137, label %._crit_edge138

261:                                              ; preds = %249
  %262 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  br label %268

263:                                              ; preds = %.lr.ph141, %._crit_edge138
  %264 = phi i64 [ %227, %.lr.ph141 ], [ %.pre170, %._crit_edge138 ]
  %265 = phi i64 [ %storemerge82139, %.lr.ph141 ], [ %.pre169, %._crit_edge138 ]
  %266 = add nsw i64 %265, 1
  store i64 %266, ptr %20, align 8, !tbaa !8
  %267 = icmp slt i64 %266, %264
  br i1 %267, label %.lr.ph141, label %._crit_edge142.loopexit, !llvm.loop !27

268:                                              ; preds = %261, %241
  %.pn83 = phi { ptr, i32 } [ %262, %261 ], [ %242, %241 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  br label %562

269:                                              ; preds = %._crit_edge145
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %25, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %270 unwind label %297

270:                                              ; preds = %269
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #8
  %271 = load i64, ptr %2, align 8, !tbaa !22
  %272 = mul nsw i64 %271, %54
  %273 = getelementptr inbounds i64, ptr %57, i64 %272
  %274 = load i64, ptr %212, align 8, !tbaa !24
  %275 = getelementptr inbounds i64, ptr %273, i64 %274
  %276 = load i64, ptr %275, align 8, !tbaa !8
  %277 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %276) #8
  %278 = getelementptr inbounds i8, ptr %277, i64 8
  store i64 0, ptr %278, align 8, !tbaa !28
  %279 = load i64, ptr %2, align 8, !tbaa !22
  %280 = mul nsw i64 %279, %54
  %281 = getelementptr inbounds i64, ptr %57, i64 %280
  %282 = load i64, ptr %212, align 8, !tbaa !24
  %283 = getelementptr inbounds i64, ptr %281, i64 %282
  %284 = load i64, ptr %283, align 8, !tbaa !8
  %285 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %284) #8
  %286 = getelementptr inbounds i8, ptr %285, i64 16
  store i64 1, ptr %286, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #8
  store i64 1, ptr %30, align 8, !tbaa !8
  %287 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %25)
  br i1 %287, label %._crit_edge154, label %.lr.ph153

.lr.ph153:                                        ; preds = %270, %436
  %288 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %25)
  %289 = load i64, ptr %288, align 8, !tbaa !30
  %290 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %25)
  %291 = getelementptr inbounds i8, ptr %290, i64 16
  %292 = load i64, ptr %291, align 8, !tbaa !32
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %25)
          to label %293 unwind label %301

293:                                              ; preds = %.lr.ph153
  %294 = getelementptr inbounds [900 x i8], ptr @vis, i64 0, i64 %292
  %295 = load i8, ptr %294, align 1, !tbaa !33, !range !34, !noundef !35
  %296 = trunc nuw i8 %295 to i1
  br i1 %296, label %436, label %303, !llvm.loop !36

297:                                              ; preds = %269, %._crit_edge145
  %298 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #8
  br label %558

299:                                              ; preds = %.invoke, %551, %540, %538, %527
  %300 = landingpad { ptr, i32 }
          cleanup
  br label %557

301:                                              ; preds = %.lr.ph153
  %302 = landingpad { ptr, i32 }
          cleanup
  br label %557

303:                                              ; preds = %293
  store i8 1, ptr %294, align 1, !tbaa !33
  %304 = getelementptr inbounds %"class.std::set", ptr %205, i64 %292
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #8
  %305 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %304) #8
  store ptr %305, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #8
  %306 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %304) #8
  store ptr %306, ptr %32, align 8
  %307 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  br i1 %307, label %.lr.ph150, label %._crit_edge151

.lr.ph150:                                        ; preds = %303
  %308 = add nsw i64 %289, 1
  br label %309

._crit_edge151:                                   ; preds = %432, %303
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #8
  br label %436

309:                                              ; preds = %.lr.ph150, %432
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #8
  %310 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  %311 = load i64, ptr %310, align 8, !tbaa !8
  store i64 %311, ptr %33, align 8, !tbaa !8
  %312 = icmp eq i64 %311, %292
  br i1 %312, label %432, label %313

313:                                              ; preds = %309
  %314 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %311) #8
  %315 = load i8, ptr %314, align 8, !tbaa !18, !range !34, !noundef !35
  %316 = trunc nuw i8 %315 to i1
  %317 = load i64, ptr %33, align 8, !tbaa !8
  br i1 %316, label %318, label %364

318:                                              ; preds = %313
  %319 = getelementptr inbounds [900 x [900 x i8]], ptr @vis2, i64 0, i64 %317, i64 %292
  %320 = load i8, ptr %319, align 1, !tbaa !33, !range !34, !noundef !35
  %321 = trunc nuw i8 %320 to i1
  br i1 %321, label %432, label %322

322:                                              ; preds = %318
  store i8 1, ptr %319, align 1, !tbaa !33
  %323 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %317) #8
  %324 = getelementptr inbounds i8, ptr %323, i64 8
  %325 = load i64, ptr %324, align 8, !tbaa !28
  %326 = icmp eq i64 %325, 2147483647
  br i1 %326, label %327, label %345

327:                                              ; preds = %322
  %328 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %292) #8
  %329 = getelementptr inbounds i8, ptr %328, i64 16
  %330 = load i64, ptr %329, align 8, !tbaa !29
  %331 = load i64, ptr %33, align 8, !tbaa !8
  %332 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %331) #8
  %333 = getelementptr inbounds i8, ptr %332, i64 16
  store i64 %330, ptr %333, align 8, !tbaa !29
  %334 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %292) #8
  %335 = getelementptr inbounds i8, ptr %334, i64 8
  %336 = load i64, ptr %335, align 8, !tbaa !28
  %337 = add nsw i64 %336, 1
  %338 = load i64, ptr %33, align 8, !tbaa !8
  %339 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %338) #8
  %340 = getelementptr inbounds i8, ptr %339, i64 8
  store i64 %337, ptr %340, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %34) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %35) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #8
  store i64 %308, ptr %36, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %30)
  invoke void @_ZSt9make_pairISt4pairIxxERxES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.15") align 8 %34, ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %341 unwind label %343

341:                                              ; preds = %327
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %25, ptr noundef nonnull align 8 dereferenceable(24) %34)
          to label %342 unwind label %343

342:                                              ; preds = %341
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %34) #8
  br label %429

343:                                              ; preds = %341, %327
  %344 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %34) #8
  br label %435

345:                                              ; preds = %322
  %346 = load i64, ptr %33, align 8, !tbaa !8
  %347 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %346) #8
  %348 = getelementptr inbounds i8, ptr %347, i64 8
  %349 = load i64, ptr %348, align 8, !tbaa !28
  %350 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %292) #8
  %351 = getelementptr inbounds i8, ptr %350, i64 8
  %352 = load i64, ptr %351, align 8, !tbaa !28
  %353 = add nsw i64 %352, 1
  %354 = icmp eq i64 %349, %353
  br i1 %354, label %355, label %429

355:                                              ; preds = %345
  %356 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %292) #8
  %357 = getelementptr inbounds i8, ptr %356, i64 16
  %358 = load i64, ptr %357, align 8, !tbaa !29
  %359 = load i64, ptr %33, align 8, !tbaa !8
  %360 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %359) #8
  %361 = getelementptr inbounds i8, ptr %360, i64 16
  %362 = load i64, ptr %361, align 8, !tbaa !29
  %363 = add nsw i64 %362, %358
  store i64 %363, ptr %361, align 8, !tbaa !29
  br label %429

364:                                              ; preds = %313
  %365 = getelementptr inbounds %"class.std::set", ptr %205, i64 %317
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %37) #8
  %366 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %365) #8
  store ptr %366, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %38) #8
  %367 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %365) #8
  store ptr %367, ptr %38, align 8
  %368 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  br i1 %368, label %.lr.ph147, label %._crit_edge148

._crit_edge148:                                   ; preds = %426, %364
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #8
  br label %429

.lr.ph147:                                        ; preds = %364, %426
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %39) #8
  %369 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  %370 = load i64, ptr %369, align 8, !tbaa !8
  store i64 %370, ptr %39, align 8, !tbaa !8
  %371 = getelementptr inbounds [900 x [900 x i8]], ptr @vis2, i64 0, i64 %370, i64 %292
  %372 = load i8, ptr %371, align 1, !tbaa !33, !range !34, !noundef !35
  %373 = trunc nuw i8 %372 to i1
  br i1 %373, label %426, label %374

374:                                              ; preds = %.lr.ph147
  store i8 1, ptr %371, align 1, !tbaa !33
  %375 = icmp eq i64 %370, %292
  br i1 %375, label %426, label %376

376:                                              ; preds = %374
  %377 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %370) #8
  %378 = load i8, ptr %377, align 8, !tbaa !18, !range !34, !noundef !35
  %379 = trunc nuw i8 %378 to i1
  br i1 %379, label %380, label %423

380:                                              ; preds = %376
  %381 = load i64, ptr %39, align 8, !tbaa !8
  %382 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %381) #8
  %383 = getelementptr inbounds i8, ptr %382, i64 8
  %384 = load i64, ptr %383, align 8, !tbaa !28
  %385 = icmp eq i64 %384, 2147483647
  br i1 %385, label %386, label %404

386:                                              ; preds = %380
  %387 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %292) #8
  %388 = getelementptr inbounds i8, ptr %387, i64 16
  %389 = load i64, ptr %388, align 8, !tbaa !29
  %390 = load i64, ptr %39, align 8, !tbaa !8
  %391 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %390) #8
  %392 = getelementptr inbounds i8, ptr %391, i64 16
  store i64 %389, ptr %392, align 8, !tbaa !29
  %393 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %292) #8
  %394 = getelementptr inbounds i8, ptr %393, i64 8
  %395 = load i64, ptr %394, align 8, !tbaa !28
  %396 = add nsw i64 %395, 1
  %397 = load i64, ptr %39, align 8, !tbaa !8
  %398 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %397) #8
  %399 = getelementptr inbounds i8, ptr %398, i64 8
  store i64 %396, ptr %399, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %40) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %41) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %42) #8
  store i64 %308, ptr %42, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %30)
  invoke void @_ZSt9make_pairISt4pairIxxERxES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.15") align 8 %40, ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %400 unwind label %402

400:                                              ; preds = %386
  invoke void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %25, ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %401 unwind label %402

401:                                              ; preds = %400
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %40) #8
  br label %423

402:                                              ; preds = %400, %386
  %403 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #8
  br label %435

404:                                              ; preds = %380
  %405 = load i64, ptr %39, align 8, !tbaa !8
  %406 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %405) #8
  %407 = getelementptr inbounds i8, ptr %406, i64 8
  %408 = load i64, ptr %407, align 8, !tbaa !28
  %409 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %292) #8
  %410 = getelementptr inbounds i8, ptr %409, i64 8
  %411 = load i64, ptr %410, align 8, !tbaa !28
  %412 = add nsw i64 %411, 1
  %413 = icmp eq i64 %408, %412
  br i1 %413, label %414, label %423

414:                                              ; preds = %404
  %415 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %292) #8
  %416 = getelementptr inbounds i8, ptr %415, i64 16
  %417 = load i64, ptr %416, align 8, !tbaa !29
  %418 = load i64, ptr %39, align 8, !tbaa !8
  %419 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %418) #8
  %420 = getelementptr inbounds i8, ptr %419, i64 16
  %421 = load i64, ptr %420, align 8, !tbaa !29
  %422 = add nsw i64 %421, %417
  store i64 %422, ptr %420, align 8, !tbaa !29
  br label %423

423:                                              ; preds = %401, %414, %404, %376
  %424 = load i64, ptr %30, align 8, !tbaa !8
  %425 = add nsw i64 %424, 1
  store i64 %425, ptr %30, align 8, !tbaa !8
  br label %426

426:                                              ; preds = %374, %.lr.ph147, %423
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #8
  %427 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  %428 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  br i1 %428, label %.lr.ph147, label %._crit_edge148

429:                                              ; preds = %342, %355, %345, %._crit_edge148
  %430 = load i64, ptr %30, align 8, !tbaa !8
  %431 = add nsw i64 %430, 1
  store i64 %431, ptr %30, align 8, !tbaa !8
  br label %432

432:                                              ; preds = %318, %309, %429
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #8
  %433 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  %434 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  br i1 %434, label %309, label %._crit_edge151

435:                                              ; preds = %402, %343
  %.pn = phi { ptr, i32 } [ %344, %343 ], [ %403, %402 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #8
  br label %557

436:                                              ; preds = %293, %._crit_edge151
  %437 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %25)
  br i1 %437, label %._crit_edge154, label %.lr.ph153

._crit_edge154:                                   ; preds = %436, %270
  %438 = load i64, ptr %3, align 8, !tbaa !22
  %439 = mul nsw i64 %438, %54
  %440 = getelementptr inbounds i64, ptr %57, i64 %439
  %441 = getelementptr inbounds i8, ptr %3, i64 8
  %442 = load i64, ptr %441, align 8, !tbaa !24
  %443 = getelementptr inbounds i64, ptr %440, i64 %442
  %444 = load i64, ptr %443, align 8, !tbaa !8
  %445 = getelementptr inbounds %"class.std::set", ptr %205, i64 %444
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %43) #8
  %446 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %445) #8
  store ptr %446, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %44) #8
  %447 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %445) #8
  store ptr %447, ptr %44, align 8
  %448 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %44) #8
  br i1 %448, label %.lr.ph156, label %._crit_edge157

._crit_edge157:                                   ; preds = %524, %._crit_edge154
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %43) #8
  %449 = load i64, ptr %3, align 8, !tbaa !22
  %450 = mul nsw i64 %449, %54
  %451 = getelementptr inbounds i64, ptr %57, i64 %450
  %452 = load i64, ptr %441, align 8, !tbaa !24
  %453 = getelementptr inbounds i64, ptr %451, i64 %452
  %454 = load i64, ptr %453, align 8, !tbaa !8
  %455 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %454) #8
  %456 = getelementptr inbounds i8, ptr %455, i64 8
  %457 = load i64, ptr %456, align 8, !tbaa !28
  %.not = icmp eq i64 %457, 2147483647
  br i1 %.not, label %551, label %527

.lr.ph156:                                        ; preds = %._crit_edge154, %524
  %458 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  %459 = load i64, ptr %458, align 8, !tbaa !8
  %460 = load i64, ptr %3, align 8, !tbaa !22
  %461 = mul nsw i64 %460, %54
  %462 = getelementptr inbounds i64, ptr %57, i64 %461
  %463 = load i64, ptr %441, align 8, !tbaa !24
  %464 = getelementptr inbounds i64, ptr %462, i64 %463
  %465 = load i64, ptr %464, align 8, !tbaa !8
  %466 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %465) #8
  %467 = getelementptr inbounds i8, ptr %466, i64 8
  %468 = load i64, ptr %467, align 8, !tbaa !28
  %sext = shl i64 %459, 32
  %469 = ashr exact i64 %sext, 32
  %470 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %469) #8
  %471 = getelementptr inbounds i8, ptr %470, i64 8
  %472 = load i64, ptr %471, align 8, !tbaa !28
  %473 = icmp slt i64 %468, %472
  br i1 %473, label %524, label %474

474:                                              ; preds = %.lr.ph156
  %475 = load i64, ptr %3, align 8, !tbaa !22
  %476 = mul nsw i64 %475, %54
  %477 = getelementptr inbounds i64, ptr %57, i64 %476
  %478 = load i64, ptr %441, align 8, !tbaa !24
  %479 = getelementptr inbounds i64, ptr %477, i64 %478
  %480 = load i64, ptr %479, align 8, !tbaa !8
  %481 = icmp eq i64 %469, %480
  br i1 %481, label %524, label %482

482:                                              ; preds = %474
  %483 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %480) #8
  %484 = getelementptr inbounds i8, ptr %483, i64 8
  %485 = load i64, ptr %484, align 8, !tbaa !28
  %486 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %469) #8
  %487 = getelementptr inbounds i8, ptr %486, i64 8
  %488 = load i64, ptr %487, align 8, !tbaa !28
  %489 = icmp sgt i64 %485, %488
  br i1 %489, label %490, label %499

490:                                              ; preds = %482
  %491 = load i64, ptr %3, align 8, !tbaa !22
  %492 = mul nsw i64 %491, %54
  %493 = getelementptr inbounds i64, ptr %57, i64 %492
  %494 = load i64, ptr %441, align 8, !tbaa !24
  %495 = getelementptr inbounds i64, ptr %493, i64 %494
  %496 = load i64, ptr %495, align 8, !tbaa !8
  %497 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %496) #8
  %498 = getelementptr inbounds i8, ptr %497, i64 16
  store i64 0, ptr %498, align 8, !tbaa !29
  br label %499

499:                                              ; preds = %490, %482
  %500 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %469) #8
  %501 = getelementptr inbounds i8, ptr %500, i64 8
  %502 = load i64, ptr %501, align 8, !tbaa !28
  %503 = load i64, ptr %3, align 8, !tbaa !22
  %504 = mul nsw i64 %503, %54
  %505 = getelementptr inbounds i64, ptr %57, i64 %504
  %506 = load i64, ptr %441, align 8, !tbaa !24
  %507 = getelementptr inbounds i64, ptr %505, i64 %506
  %508 = load i64, ptr %507, align 8, !tbaa !8
  %509 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %508) #8
  %510 = getelementptr inbounds i8, ptr %509, i64 8
  store i64 %502, ptr %510, align 8, !tbaa !28
  %511 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %469) #8
  %512 = getelementptr inbounds i8, ptr %511, i64 16
  %513 = load i64, ptr %512, align 8, !tbaa !29
  %514 = load i64, ptr %3, align 8, !tbaa !22
  %515 = mul nsw i64 %514, %54
  %516 = getelementptr inbounds i64, ptr %57, i64 %515
  %517 = load i64, ptr %441, align 8, !tbaa !24
  %518 = getelementptr inbounds i64, ptr %516, i64 %517
  %519 = load i64, ptr %518, align 8, !tbaa !8
  %520 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %519) #8
  %521 = getelementptr inbounds i8, ptr %520, i64 16
  %522 = load i64, ptr %521, align 8, !tbaa !29
  %523 = add nsw i64 %522, %513
  store i64 %523, ptr %521, align 8, !tbaa !29
  br label %524

524:                                              ; preds = %.lr.ph156, %474, %499
  %525 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEv(ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  %526 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %44) #8
  br i1 %526, label %.lr.ph156, label %._crit_edge157

527:                                              ; preds = %._crit_edge157
  %528 = load i64, ptr %3, align 8, !tbaa !22
  %529 = mul nsw i64 %528, %54
  %530 = getelementptr inbounds i64, ptr %57, i64 %529
  %531 = load i64, ptr %441, align 8, !tbaa !24
  %532 = getelementptr inbounds i64, ptr %530, i64 %531
  %533 = load i64, ptr %532, align 8, !tbaa !8
  %534 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %533) #8
  %535 = getelementptr inbounds i8, ptr %534, i64 8
  %536 = load i64, ptr %535, align 8, !tbaa !28
  %537 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %536)
          to label %538 unwind label %299

538:                                              ; preds = %527
  %539 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %537, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %540 unwind label %299

540:                                              ; preds = %538
  %541 = load i64, ptr %3, align 8, !tbaa !22
  %542 = mul nsw i64 %541, %54
  %543 = getelementptr inbounds i64, ptr %57, i64 %542
  %544 = load i64, ptr %441, align 8, !tbaa !24
  %545 = getelementptr inbounds i64, ptr %543, i64 %544
  %546 = load i64, ptr %545, align 8, !tbaa !8
  %547 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3datSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %546) #8
  %548 = getelementptr inbounds i8, ptr %547, i64 16
  %549 = load i64, ptr %548, align 8, !tbaa !29
  %550 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %549)
          to label %.invoke unwind label %299

551:                                              ; preds = %._crit_edge157
  %552 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %.invoke unwind label %299

.invoke:                                          ; preds = %551, %540
  %553 = phi ptr [ %550, %540 ], [ %552, %551 ]
  %554 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %553, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %555 unwind label %299

555:                                              ; preds = %.invoke
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #8
  call void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %25) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #8
  br i1 %204, label %.loopexit97, label %.preheader96.preheader

.preheader96.preheader:                           ; preds = %555
  %556 = getelementptr inbounds %"class.std::set", ptr %205, i64 %.0.lcssa174
  br label %.preheader96

557:                                              ; preds = %301, %435, %299
  %.pn.pn.pn = phi { ptr, i32 } [ %300, %299 ], [ %.pn, %435 ], [ %302, %301 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #8
  br label %558

558:                                              ; preds = %557, %297
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %557 ], [ %298, %297 ]
  call void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %25) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #8
  br label %562

.preheader96:                                     ; preds = %.preheader96.preheader, %.preheader96
  %559 = phi ptr [ %560, %.preheader96 ], [ %556, %.preheader96.preheader ]
  %560 = getelementptr inbounds i8, ptr %559, i64 -48
  call void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %560) #8
  %561 = icmp eq ptr %560, %205
  br i1 %561, label %.loopexit97, label %.preheader96

.loopexit97:                                      ; preds = %.preheader96, %555
  call void @_ZNSt6vectorI3datSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  ret i32 0

562:                                              ; preds = %558, %268
  %.pn83.pn = phi { ptr, i32 } [ %.pn83, %268 ], [ %.pn.pn.pn.pn, %558 ]
  br i1 %204, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %562
  %563 = getelementptr inbounds %"class.std::set", ptr %205, i64 %.0.lcssa174
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %564 = phi ptr [ %565, %.preheader ], [ %563, %.preheader.preheader ]
  %565 = getelementptr inbounds i8, ptr %564, i64 -48
  call void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %565) #8
  %566 = icmp eq ptr %565, %205
  br i1 %566, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %562, %197
  %.pn92.pn = phi { ptr, i32 } [ %.pn92, %197 ], [ %.pn83.pn, %562 ], [ %.pn83.pn, %.preheader ]
  call void @_ZNSt6vectorI3datSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn92.pn
}

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16)) 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_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 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 #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairISt4pairIxxERxES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.15") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

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

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

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

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

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

; 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 #0 align 2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIS0_IxxExESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #7 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14, !15}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14, !15}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTS3dat", !20, i64 0, !9, i64 8, !9, i64 16}
!20 = !{!"bool", !10, i64 0}
!21 = distinct !{!21, !14}
!22 = !{!23, !9, i64 0}
!23 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!24 = !{!23, !9, i64 8}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = !{!19, !9, i64 8}
!29 = !{!19, !9, i64 16}
!30 = !{!31, !9, i64 0}
!31 = !{!"_ZTSSt4pairIS_IxxExE", !23, i64 0, !9, i64 16}
!32 = !{!31, !9, i64 16}
!33 = !{!20, !20, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !14}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass