; LLVM IR from abeaumont/competitive-programming :: cses (1693)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::set<int>, std::allocator<std::set<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::set<int>, std::allocator<std::set<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::set<int>, std::allocator<std::set<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::set<int>, std::allocator<std::set<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.15" = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.std::allocator.2" = type { i8 }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::pair.18" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@g = external dso_local global %"class.std::vector", align 8
@s = external dso_local global %"class.std::vector.0", align 8
@ans = external dso_local global %"class.std::vector.0", align 8
@cc = external dso_local global %"class.std::vector.5", align 8
@ci = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4dfs1i(i32 noundef) #1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4dfs2i(i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48), ptr) #1 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) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector.13", align 8
  %7 = alloca %"class.std::allocator.15", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::vector.0", align 8
  %13 = alloca %"class.std::allocator.2", align 1
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca %"class.std::allocator.2", align 1
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair", align 4
  %18 = alloca %"struct.std::pair.18", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::vector.0", align 8
  %22 = alloca %"class.std::allocator.2", align 1
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::pair.18", align 8
  %26 = alloca %"class.std::vector.0", align 8
  %27 = alloca %"class.std::allocator.2", align 1
  %28 = alloca %"class.std::queue", align 8
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::vector", align 8
  %31 = alloca %"class.std::allocator", align 1
  %32 = alloca i32, align 4
  %33 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %34 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %35 = alloca i32, align 4
  %36 = alloca %"struct.std::pair.18", align 8
  %37 = alloca %"class.std::vector.0", align 8
  %38 = alloca %"class.std::allocator.2", align 1
  %39 = alloca i32, align 4
  %40 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %41 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %42 = alloca i32, align 4
  %43 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %44 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %45 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %46 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %51 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %52 = getelementptr i8, ptr %51, i64 -24
  %53 = load i64, ptr %52, align 8
  %54 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %53
  %55 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %54, ptr noundef null)
  %56 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #8
  %59 = load i32, ptr %3, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  call void @_ZNSaISt4pairIiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %60, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %61 unwind label %77

61:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt4pairIiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  %62 = load i32, ptr %2, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #8
  call void @_ZNSaISt3setIiSt4lessIiESaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  invoke void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %64 unwind label %81

64:                                               ; preds = %61
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEaSEOS6_(ptr noundef nonnull align 8 dereferenceable(24) @g, ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @_ZNSt15__new_allocatorISt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  %66 = load i32, ptr %2, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %67, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %68 unwind label %85

68:                                               ; preds = %64
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  %69 = load i32, ptr %2, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %70, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %71 unwind label %89

71:                                               ; preds = %68
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !8
  br label %72

72:                                               ; preds = %126, %71
  %73 = load i32, ptr %16, align 4, !tbaa !8
  %74 = load i32, ptr %3, align 4, !tbaa !8
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %93, label %76

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

77:                                               ; preds = %0
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %8, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt4pairIiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  br label %501

81:                                               ; preds = %61
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %8, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  br label %500

85:                                               ; preds = %64
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %8, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #8
  br label %499

89:                                               ; preds = %68
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %8, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  br label %498

93:                                               ; preds = %72
  %94 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %95 unwind label %129

95:                                               ; preds = %93
  %96 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %94, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %97 unwind label %129

97:                                               ; preds = %95
  %98 = load i32, ptr %4, align 4, !tbaa !8
  %99 = add nsw i32 %98, -1
  store i32 %99, ptr %4, align 4, !tbaa !8
  %100 = load i32, ptr %5, align 4, !tbaa !8
  %101 = add nsw i32 %100, -1
  store i32 %101, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %102 unwind label %133

102:                                              ; preds = %97
  %103 = load i32, ptr %16, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %104) #8
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %105, ptr noundef nonnull align 4 dereferenceable(8) %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  %107 = load i32, ptr %4, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %108) #8
  %110 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %109, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %111 unwind label %129

111:                                              ; preds = %102
  %112 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %113 = extractvalue { ptr, i8 } %110, 0
  store ptr %113, ptr %112, align 8
  %114 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %115 = extractvalue { ptr, i8 } %110, 1
  store i8 %115, ptr %114, align 8
  %116 = load i32, ptr %4, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %117) #8
  %119 = load i32, ptr %118, align 4, !tbaa !8
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %118, align 4, !tbaa !8
  %121 = load i32, ptr %5, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %122) #8
  %124 = load i32, ptr %123, align 4, !tbaa !8
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %123, align 4, !tbaa !8
  br label %126

126:                                              ; preds = %111
  %127 = load i32, ptr %16, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %16, align 4, !tbaa !8
  br label %72, !llvm.loop !11

129:                                              ; preds = %102, %95, %93
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %8, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %9, align 4
  br label %137

133:                                              ; preds = %97
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %8, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %497

138:                                              ; preds = %76
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #8
  %140 = load i32, ptr %139, align 4, !tbaa !8
  %141 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0) #8
  %142 = load i32, ptr %141, align 4, !tbaa !8
  %143 = sub nsw i32 %142, 1
  %144 = icmp ne i32 %140, %143
  br i1 %144, label %145, label %165

145:                                              ; preds = %138
  %146 = load i32, ptr %2, align 4, !tbaa !8
  %147 = sub nsw i32 %146, 1
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %148) #8
  %150 = load i32, ptr %149, align 4, !tbaa !8
  %151 = load i32, ptr %2, align 4, !tbaa !8
  %152 = sub nsw i32 %151, 1
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %153) #8
  %155 = load i32, ptr %154, align 4, !tbaa !8
  %156 = sub nsw i32 %155, 1
  %157 = icmp ne i32 %150, %156
  br i1 %157, label %158, label %165

158:                                              ; preds = %145
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %160 unwind label %161

160:                                              ; preds = %158
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  br label %490

161:                                              ; preds = %198, %158
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %8, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %9, align 4
  br label %497

165:                                              ; preds = %145, %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 1, ptr %20, align 4, !tbaa !8
  br label %166

166:                                              ; preds = %190, %165
  %167 = load i32, ptr %20, align 4, !tbaa !8
  %168 = load i32, ptr %2, align 4, !tbaa !8
  %169 = sub nsw i32 %168, 1
  %170 = icmp slt i32 %167, %169
  br i1 %170, label %172, label %171

171:                                              ; preds = %166
  store i32 5, ptr %19, align 4
  br label %193

172:                                              ; preds = %166
  %173 = load i32, ptr %20, align 4, !tbaa !8
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %174) #8
  %176 = load i32, ptr %175, align 4, !tbaa !8
  %177 = load i32, ptr %20, align 4, !tbaa !8
  %178 = sext i32 %177 to i64
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %178) #8
  %180 = load i32, ptr %179, align 4, !tbaa !8
  %181 = icmp ne i32 %176, %180
  br i1 %181, label %182, label %189

182:                                              ; preds = %172
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %184 unwind label %185

184:                                              ; preds = %182
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  br label %193

185:                                              ; preds = %182
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %8, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %497

189:                                              ; preds = %172
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %20, align 4, !tbaa !8
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %20, align 4, !tbaa !8
  br label %166, !llvm.loop !13

193:                                              ; preds = %184, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  %194 = load i32, ptr %19, align 4
  switch i32 %194, label %490 [
    i32 5, label %195
  ]

195:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #8
  %196 = load i32, ptr %2, align 4, !tbaa !8
  %197 = sext i32 %196 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %197, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %198 unwind label %206

198:                                              ; preds = %195
  %199 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @s, ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  invoke void @_Z4dfs1i(i32 noundef 0)
          to label %200 unwind label %161

200:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !8
  br label %201

201:                                              ; preds = %229, %200
  %202 = load i32, ptr %23, align 4, !tbaa !8
  %203 = load i32, ptr %2, align 4, !tbaa !8
  %204 = icmp slt i32 %202, %203
  br i1 %204, label %210, label %205

205:                                              ; preds = %201
  store i32 8, ptr %19, align 4
  br label %232

206:                                              ; preds = %195
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %8, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  br label %497

210:                                              ; preds = %201
  %211 = load i32, ptr %23, align 4, !tbaa !8
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %212) #8
  %214 = load i32, ptr %213, align 4, !tbaa !8
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %228, label %216

216:                                              ; preds = %210
  %217 = load i32, ptr %23, align 4, !tbaa !8
  %218 = sext i32 %217 to i64
  %219 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %218) #8
  %220 = call noundef zeroext i1 @_ZNKSt3setIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %219) #8
  br i1 %220, label %228, label %221

221:                                              ; preds = %216
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %223 unwind label %224

223:                                              ; preds = %221
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  br label %232

224:                                              ; preds = %221
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %8, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %497

228:                                              ; preds = %216, %210
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %23, align 4, !tbaa !8
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %23, align 4, !tbaa !8
  br label %201, !llvm.loop !14

232:                                              ; preds = %223, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  %233 = load i32, ptr %19, align 4
  switch i32 %233, label %490 [
    i32 8, label %234
  ]

234:                                              ; preds = %232
  %235 = load i32, ptr %2, align 4, !tbaa !8
  %236 = sub nsw i32 %235, 1
  %237 = sext i32 %236 to i64
  %238 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %237) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !8
  %239 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %238, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %240 unwind label %304

240:                                              ; preds = %234
  %241 = getelementptr inbounds { ptr, i8 }, ptr %25, i32 0, i32 0
  %242 = extractvalue { ptr, i8 } %239, 0
  store ptr %242, ptr %241, align 8
  %243 = getelementptr inbounds { ptr, i8 }, ptr %25, i32 0, i32 1
  %244 = extractvalue { ptr, i8 } %239, 1
  store i8 %244, ptr %243, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #8
  %245 = load i32, ptr %2, align 4, !tbaa !8
  %246 = sext i32 %245 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %246, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %247 unwind label %308

247:                                              ; preds = %240
  %248 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @s, ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr %28) #8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %28)
          to label %249 unwind label %312

249:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %28, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %250 unwind label %316

250:                                              ; preds = %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  %251 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef 0) #8
  store i32 1, ptr %251, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #8
  %252 = load i32, ptr %2, align 4, !tbaa !8
  %253 = sext i32 %252 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #8
  call void @_ZNSaISt3setIiSt4lessIiESaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  invoke void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %253, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %254 unwind label %320

254:                                              ; preds = %250
  %255 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEaSEOS6_(ptr noundef nonnull align 8 dereferenceable(24) @ci, ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @_ZNSt15__new_allocatorISt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  br label %256

256:                                              ; preds = %383, %254
  %257 = invoke noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %28)
          to label %258 unwind label %324

258:                                              ; preds = %256
  %259 = xor i1 %257, true
  br i1 %259, label %260, label %385

260:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %261 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %28)
          to label %262 unwind label %328

262:                                              ; preds = %260
  %263 = load i32, ptr %261, align 4, !tbaa !8
  store i32 %263, ptr %32, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %28)
          to label %264 unwind label %328

264:                                              ; preds = %262
  br label %265

265:                                              ; preds = %382, %264
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %266 = load i32, ptr %32, align 4, !tbaa !8
  %267 = sext i32 %266 to i64
  %268 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %267) #8
  %269 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %268) #8
  %270 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %33, i32 0, i32 0
  store ptr %269, ptr %270, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %271 = load i32, ptr %32, align 4, !tbaa !8
  %272 = sext i32 %271 to i64
  %273 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %272) #8
  %274 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %273) #8
  %275 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %34, i32 0, i32 0
  store ptr %274, ptr %275, align 8
  %276 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  br i1 %276, label %277, label %383

277:                                              ; preds = %265
  %278 = load i32, ptr %32, align 4, !tbaa !8
  %279 = sext i32 %278 to i64
  %280 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef %279) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %281 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @cc) #8
  %282 = trunc i64 %281 to i32
  store i32 %282, ptr %35, align 4, !tbaa !8
  %283 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %280, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %284 unwind label %332

284:                                              ; preds = %277
  %285 = getelementptr inbounds { ptr, i8 }, ptr %36, i32 0, i32 0
  %286 = extractvalue { ptr, i8 } %283, 0
  store ptr %286, ptr %285, align 8
  %287 = getelementptr inbounds { ptr, i8 }, ptr %36, i32 0, i32 1
  %288 = extractvalue { ptr, i8 } %283, 1
  store i8 %288, ptr %287, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %37) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef 1, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %289 unwind label %336

289:                                              ; preds = %284
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @cc, ptr noundef nonnull align 8 dereferenceable(24) %37)
          to label %290 unwind label %340

290:                                              ; preds = %289
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #8
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  br label %291

291:                                              ; preds = %376, %290
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %292 = load i32, ptr %32, align 4, !tbaa !8
  %293 = sext i32 %292 to i64
  %294 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %293) #8
  %295 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %294) #8
  %296 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %40, i32 0, i32 0
  store ptr %295, ptr %296, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  %297 = load i32, ptr %32, align 4, !tbaa !8
  %298 = sext i32 %297 to i64
  %299 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %298) #8
  %300 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %299) #8
  %301 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %41, i32 0, i32 0
  store ptr %300, ptr %301, align 8
  %302 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br i1 %302, label %303, label %345

303:                                              ; preds = %291
  br label %382

304:                                              ; preds = %234
  %305 = landingpad { ptr, i32 }
          cleanup
  %306 = extractvalue { ptr, i32 } %305, 0
  store ptr %306, ptr %8, align 8
  %307 = extractvalue { ptr, i32 } %305, 1
  store i32 %307, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %497

308:                                              ; preds = %240
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %8, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #8
  br label %497

312:                                              ; preds = %247
  %313 = landingpad { ptr, i32 }
          cleanup
  %314 = extractvalue { ptr, i32 } %313, 0
  store ptr %314, ptr %8, align 8
  %315 = extractvalue { ptr, i32 } %313, 1
  store i32 %315, ptr %9, align 4
  br label %496

316:                                              ; preds = %249
  %317 = landingpad { ptr, i32 }
          cleanup
  %318 = extractvalue { ptr, i32 } %317, 0
  store ptr %318, ptr %8, align 8
  %319 = extractvalue { ptr, i32 } %317, 1
  store i32 %319, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %495

320:                                              ; preds = %250
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %8, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  br label %495

324:                                              ; preds = %256
  %325 = landingpad { ptr, i32 }
          cleanup
  %326 = extractvalue { ptr, i32 } %325, 0
  store ptr %326, ptr %8, align 8
  %327 = extractvalue { ptr, i32 } %325, 1
  store i32 %327, ptr %9, align 4
  br label %495

328:                                              ; preds = %262, %260
  %329 = landingpad { ptr, i32 }
          cleanup
  %330 = extractvalue { ptr, i32 } %329, 0
  store ptr %330, ptr %8, align 8
  %331 = extractvalue { ptr, i32 } %329, 1
  store i32 %331, ptr %9, align 4
  br label %384

332:                                              ; preds = %277
  %333 = landingpad { ptr, i32 }
          cleanup
  %334 = extractvalue { ptr, i32 } %333, 0
  store ptr %334, ptr %8, align 8
  %335 = extractvalue { ptr, i32 } %333, 1
  store i32 %335, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %384

336:                                              ; preds = %284
  %337 = landingpad { ptr, i32 }
          cleanup
  %338 = extractvalue { ptr, i32 } %337, 0
  store ptr %338, ptr %8, align 8
  %339 = extractvalue { ptr, i32 } %337, 1
  store i32 %339, ptr %9, align 4
  br label %344

340:                                              ; preds = %289
  %341 = landingpad { ptr, i32 }
          cleanup
  %342 = extractvalue { ptr, i32 } %341, 0
  store ptr %342, ptr %8, align 8
  %343 = extractvalue { ptr, i32 } %341, 1
  store i32 %343, ptr %9, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #8
  br label %344

344:                                              ; preds = %340, %336
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #8
  br label %384

345:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %346 = load i32, ptr %32, align 4, !tbaa !8
  %347 = sext i32 %346 to i64
  %348 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %347) #8
  %349 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %348) #8
  %350 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %43, i32 0, i32 0
  store ptr %349, ptr %350, align 8
  %351 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  %352 = load i32, ptr %351, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  store i32 %352, ptr %42, align 4, !tbaa !8
  %353 = load i32, ptr %42, align 4, !tbaa !8
  %354 = sext i32 %353 to i64
  %355 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %354) #8
  %356 = load i32, ptr %355, align 4, !tbaa !8
  %357 = icmp ne i32 %356, 0
  br i1 %357, label %367, label %358

358:                                              ; preds = %345
  %359 = load i32, ptr %42, align 4, !tbaa !8
  %360 = sext i32 %359 to i64
  %361 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %360) #8
  store i32 1, ptr %361, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %28, ptr noundef nonnull align 4 dereferenceable(4) %42)
          to label %362 unwind label %363

362:                                              ; preds = %358
  br label %367

363:                                              ; preds = %372, %367, %358
  %364 = landingpad { ptr, i32 }
          cleanup
  %365 = extractvalue { ptr, i32 } %364, 0
  store ptr %365, ptr %8, align 8
  %366 = extractvalue { ptr, i32 } %364, 1
  store i32 %366, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %384

367:                                              ; preds = %362, %345
  %368 = load i32, ptr %32, align 4, !tbaa !8
  %369 = sext i32 %368 to i64
  %370 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %369) #8
  %371 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %370, ptr noundef nonnull align 4 dereferenceable(4) %42)
          to label %372 unwind label %363

372:                                              ; preds = %367
  %373 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @cc) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %373, ptr noundef nonnull align 4 dereferenceable(4) %42)
          to label %374 unwind label %363

374:                                              ; preds = %372
  %375 = load i32, ptr %42, align 4, !tbaa !8
  store i32 %375, ptr %32, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  br label %376

376:                                              ; preds = %374
  %377 = load i32, ptr %32, align 4, !tbaa !8
  %378 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @cc) #8
  %379 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %378, i64 noundef 0) #8
  %380 = load i32, ptr %379, align 4, !tbaa !8
  %381 = icmp ne i32 %377, %380
  br i1 %381, label %291, label %382, !llvm.loop !15

382:                                              ; preds = %376, %303
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %265, !llvm.loop !16

383:                                              ; preds = %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %256, !llvm.loop !17

384:                                              ; preds = %363, %344, %332, %328
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %495

385:                                              ; preds = %258
  br label %386

386:                                              ; preds = %402, %385
  %387 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef 0) #8
  %388 = call noundef zeroext i1 @_ZNKSt3setIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %387) #8
  %389 = xor i1 %388, true
  br i1 %389, label %390, label %407

390:                                              ; preds = %386
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %391 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef 0) #8
  %392 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %391) #8
  %393 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %44, i32 0, i32 0
  store ptr %392, ptr %393, align 8
  %394 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef 0) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 8 %44, i64 8, i1 false), !tbaa.struct !18
  %395 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %45, i32 0, i32 0
  %396 = load ptr, ptr %395, align 8
  %397 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %394, ptr %396)
          to label %398 unwind label %403

398:                                              ; preds = %390
  %399 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %46, i32 0, i32 0
  store ptr %397, ptr %399, align 8
  %400 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #8
  %401 = load i32, ptr %400, align 4, !tbaa !8
  invoke void @_Z4dfs2i(i32 noundef %401)
          to label %402 unwind label %403

402:                                              ; preds = %398
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %386, !llvm.loop !21

403:                                              ; preds = %398, %390
  %404 = landingpad { ptr, i32 }
          cleanup
  %405 = extractvalue { ptr, i32 } %404, 0
  store ptr %405, ptr %8, align 8
  %406 = extractvalue { ptr, i32 } %404, 1
  store i32 %406, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %495

407:                                              ; preds = %386
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  store i32 0, ptr %48, align 4, !tbaa !8
  br label %408

408:                                              ; preds = %431, %407
  %409 = load i32, ptr %48, align 4, !tbaa !8
  %410 = load i32, ptr %3, align 4, !tbaa !8
  %411 = icmp sle i32 %409, %410
  br i1 %411, label %413, label %412

412:                                              ; preds = %408
  store i32 19, ptr %19, align 4
  br label %434

413:                                              ; preds = %408
  %414 = load i32, ptr %48, align 4, !tbaa !8
  %415 = sext i32 %414 to i64
  %416 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %415) #8
  %417 = load i32, ptr %416, align 4, !tbaa !8
  %418 = load i32, ptr %2, align 4, !tbaa !8
  %419 = sub nsw i32 %418, 1
  %420 = icmp eq i32 %417, %419
  br i1 %420, label %421, label %430

421:                                              ; preds = %413
  %422 = load i32, ptr %48, align 4, !tbaa !8
  %423 = add nsw i32 %422, 1
  %424 = sext i32 %423 to i64
  %425 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %424) #8
  %426 = load i32, ptr %425, align 4, !tbaa !8
  %427 = icmp eq i32 %426, 0
  br i1 %427, label %428, label %430

428:                                              ; preds = %421
  %429 = load i32, ptr %48, align 4, !tbaa !8
  store i32 %429, ptr %47, align 4, !tbaa !8
  store i32 19, ptr %19, align 4
  br label %434

430:                                              ; preds = %421, %413
  br label %431

431:                                              ; preds = %430
  %432 = load i32, ptr %48, align 4, !tbaa !8
  %433 = add nsw i32 %432, 1
  store i32 %433, ptr %48, align 4, !tbaa !8
  br label %408, !llvm.loop !22

434:                                              ; preds = %428, %412
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  br label %435

435:                                              ; preds = %434
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  %436 = load i32, ptr %47, align 4, !tbaa !8
  %437 = add nsw i32 %436, 1
  store i32 %437, ptr %49, align 4, !tbaa !8
  br label %438

438:                                              ; preds = %453, %435
  %439 = load i32, ptr %49, align 4, !tbaa !8
  %440 = load i32, ptr %3, align 4, !tbaa !8
  %441 = icmp sle i32 %439, %440
  br i1 %441, label %443, label %442

442:                                              ; preds = %438
  store i32 22, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  br label %460

443:                                              ; preds = %438
  %444 = load i32, ptr %49, align 4, !tbaa !8
  %445 = sext i32 %444 to i64
  %446 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %445) #8
  %447 = load i32, ptr %446, align 4, !tbaa !8
  %448 = add nsw i32 %447, 1
  %449 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %448)
          to label %450 unwind label %456

450:                                              ; preds = %443
  %451 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %449, i8 noundef signext 32)
          to label %452 unwind label %456

452:                                              ; preds = %450
  br label %453

453:                                              ; preds = %452
  %454 = load i32, ptr %49, align 4, !tbaa !8
  %455 = add nsw i32 %454, 1
  store i32 %455, ptr %49, align 4, !tbaa !8
  br label %438, !llvm.loop !23

456:                                              ; preds = %450, %443
  %457 = landingpad { ptr, i32 }
          cleanup
  %458 = extractvalue { ptr, i32 } %457, 0
  store ptr %458, ptr %8, align 8
  %459 = extractvalue { ptr, i32 } %457, 1
  store i32 %459, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  br label %494

460:                                              ; preds = %442
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  store i32 0, ptr %50, align 4, !tbaa !8
  br label %461

461:                                              ; preds = %482, %460
  %462 = load i32, ptr %50, align 4, !tbaa !8
  %463 = load i32, ptr %47, align 4, !tbaa !8
  %464 = icmp sle i32 %462, %463
  br i1 %464, label %466, label %465

465:                                              ; preds = %461
  store i32 25, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  br label %489

466:                                              ; preds = %461
  %467 = load i32, ptr %50, align 4, !tbaa !8
  %468 = sext i32 %467 to i64
  %469 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %468) #8
  %470 = load i32, ptr %469, align 4, !tbaa !8
  %471 = add nsw i32 %470, 1
  %472 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %471)
          to label %473 unwind label %485

473:                                              ; preds = %466
  %474 = load i32, ptr %50, align 4, !tbaa !8
  %475 = load i32, ptr %47, align 4, !tbaa !8
  %476 = icmp eq i32 %474, %475
  %477 = zext i1 %476 to i64
  %478 = getelementptr inbounds [3 x i8], ptr @.str.6, i64 0, i64 %477
  %479 = load i8, ptr %478, align 1, !tbaa !24
  %480 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %472, i8 noundef signext %479)
          to label %481 unwind label %485

481:                                              ; preds = %473
  br label %482

482:                                              ; preds = %481
  %483 = load i32, ptr %50, align 4, !tbaa !8
  %484 = add nsw i32 %483, 1
  store i32 %484, ptr %50, align 4, !tbaa !8
  br label %461, !llvm.loop !25

485:                                              ; preds = %473, %466
  %486 = landingpad { ptr, i32 }
          cleanup
  %487 = extractvalue { ptr, i32 } %486, 0
  store ptr %487, ptr %8, align 8
  %488 = extractvalue { ptr, i32 } %486, 1
  store i32 %488, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  br label %494

489:                                              ; preds = %465
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %28) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %28) #8
  store i32 0, ptr %19, align 4
  br label %490

490:                                              ; preds = %489, %232, %193, %160
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %491 = load i32, ptr %19, align 4
  switch i32 %491, label %507 [
    i32 0, label %492
    i32 1, label %492
  ]

492:                                              ; preds = %490, %490
  %493 = load i32, ptr %1, align 4
  ret i32 %493

494:                                              ; preds = %485, %456
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  br label %495

495:                                              ; preds = %494, %403, %384, %324, %320, %316
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %28) #8
  br label %496

496:                                              ; preds = %495, %312
  call void @llvm.lifetime.end.p0(i64 80, ptr %28) #8
  br label %497

497:                                              ; preds = %496, %308, %304, %224, %206, %185, %161, %137
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  br label %498

498:                                              ; preds = %497, %89
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  br label %499

499:                                              ; preds = %498, %85
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  br label %500

500:                                              ; preds = %499, %81
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  br label %501

501:                                              ; preds = %500, %77
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %502

502:                                              ; preds = %501
  %503 = load ptr, ptr %8, align 8
  %504 = load i32, ptr %9, align 4
  %505 = insertvalue { ptr, i32 } poison, ptr %503, 0
  %506 = insertvalue { ptr, i32 } %505, i32 %504, 1
  resume { ptr, i32 } %506

507:                                              ; preds = %490
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = !{i64 0, i64 8, !19}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !10, i64 0}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = !{!10, !10, i64 0}
!25 = distinct !{!25, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::set<int>, std::allocator<std::set<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::set<int>, std::allocator<std::set<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::set<int>, std::allocator<std::set<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::set<int>, std::allocator<std::set<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.15" = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.std::allocator.2" = type { i8 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@g = external dso_local global %"class.std::vector", align 8
@s = external dso_local global %"class.std::vector.0", align 8
@ans = external dso_local global %"class.std::vector.0", align 8
@cc = external dso_local global %"class.std::vector.5", align 8
@ci = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4dfs1i(i32 noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4dfs2i(i32 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.13", align 8
  %6 = alloca %"class.std::allocator.15", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca %"class.std::allocator.2", align 1
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector.0", align 8
  %18 = alloca %"class.std::allocator.2", align 1
  %19 = alloca %"class.std::queue", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::vector", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::vector.0", align 8
  %28 = alloca %"class.std::allocator.2", align 1
  %29 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %30 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %31 = alloca i32, align 4
  %32 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %33 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %34 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %35 = getelementptr i8, ptr %34, i64 -24
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %36
  %38 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %37, ptr noundef null)
  %39 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %42 = load i32, ptr %2, align 4, !tbaa !8
  %43 = sext i32 %42 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaISt4pairIiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %43, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %44 unwind label %62

44:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt4pairIiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  %45 = load i32, ptr %1, align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  call void @_ZNSaISt3setIiSt4lessIiESaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %46, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %47 unwind label %64

47:                                               ; preds = %44
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEaSEOS6_(ptr noundef nonnull align 8 dereferenceable(24) @g, ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @_ZNSt15__new_allocatorISt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  %49 = load i32, ptr %1, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %50, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %51 unwind label %66

51:                                               ; preds = %47
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  %52 = load i32, ptr %1, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %53, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %54 unwind label %68

54:                                               ; preds = %51
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %84, %54
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0) #7
  %58 = load i32, ptr %57, align 4, !tbaa !8
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef 0) #7
  %60 = load i32, ptr %59, align 4, !tbaa !8
  %61 = add nsw i32 %60, -1
  %.not = icmp eq i32 %58, %61
  br i1 %.not, label %116, label %100

62:                                               ; preds = %0
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %310

64:                                               ; preds = %44
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %309

66:                                               ; preds = %47
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  br label %308

68:                                               ; preds = %51
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  br label %307

.lr.ph:                                           ; preds = %54, %84
  %indvars.iv = phi i64 [ %indvars.iv.next, %84 ], [ 0, %54 ]
  %70 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %71 unwind label %98

71:                                               ; preds = %.lr.ph
  %72 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %73 unwind label %98

73:                                               ; preds = %71
  %74 = load i32, ptr %3, align 4, !tbaa !8
  %75 = add nsw i32 %74, -1
  store i32 %75, ptr %3, align 4, !tbaa !8
  %76 = load i32, ptr %4, align 4, !tbaa !8
  %77 = add nsw i32 %76, -1
  store i32 %77, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %78 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #7
  %79 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %78, ptr noundef nonnull align 4 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %80 = load i32, ptr %3, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %81) #7
  %83 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %82, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %84 unwind label %98

84:                                               ; preds = %73
  %85 = load i32, ptr %3, align 4, !tbaa !8
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %86) #7
  %88 = load i32, ptr %87, align 4, !tbaa !8
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %87, align 4, !tbaa !8
  %90 = load i32, ptr %4, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %91) #7
  %93 = load i32, ptr %92, align 4, !tbaa !8
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %92, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %95 = load i32, ptr %2, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = icmp slt i64 %indvars.iv.next, %96
  br i1 %97, label %.lr.ph, label %._crit_edge, !llvm.loop !11

98:                                               ; preds = %73, %71, %.lr.ph
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %306

100:                                              ; preds = %._crit_edge
  %101 = load i32, ptr %1, align 4, !tbaa !8
  %102 = add nsw i32 %101, -1
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %103) #7
  %105 = load i32, ptr %104, align 4, !tbaa !8
  %106 = load i32, ptr %1, align 4, !tbaa !8
  %107 = add nsw i32 %106, -1
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #7
  %110 = load i32, ptr %109, align 4, !tbaa !8
  %111 = add nsw i32 %110, -1
  %.not59 = icmp eq i32 %105, %111
  br i1 %.not59, label %116, label %112

112:                                              ; preds = %100
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %303 unwind label %114

114:                                              ; preds = %132, %112
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %306

116:                                              ; preds = %100, %._crit_edge
  %117 = load i32, ptr %1, align 4, !tbaa !8
  %.not6188 = icmp sgt i32 %117, 2
  br i1 %.not6188, label %.lr.ph91, label %.critedge

118:                                              ; preds = %.lr.ph91
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %119 = load i32, ptr %1, align 4, !tbaa !8
  %120 = add nsw i32 %119, -1
  %121 = sext i32 %120 to i64
  %.not61 = icmp slt i64 %indvars.iv.next107, %121
  br i1 %.not61, label %.lr.ph91, label %.critedge, !llvm.loop !13

.lr.ph91:                                         ; preds = %116, %118
  %indvars.iv106 = phi i64 [ %indvars.iv.next107, %118 ], [ 1, %116 ]
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv106) #7
  %123 = load i32, ptr %122, align 4, !tbaa !8
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv106) #7
  %125 = load i32, ptr %124, align 4, !tbaa !8
  %.not60 = icmp eq i32 %123, %125
  br i1 %.not60, label %118, label %126

126:                                              ; preds = %.lr.ph91
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %303 unwind label %128

128:                                              ; preds = %126
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %306

.critedge:                                        ; preds = %118, %116
  %130 = phi i32 [ %117, %116 ], [ %119, %118 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #7
  %131 = sext i32 %130 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %131, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %132 unwind label %135

132:                                              ; preds = %.critedge
  %133 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @s, ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  invoke void @_Z4dfs1i(i32 noundef 0)
          to label %.preheader86 unwind label %114

.preheader86:                                     ; preds = %132
  %134 = load i32, ptr %1, align 4, !tbaa !8
  %.not6392 = icmp sgt i32 %134, 0
  br i1 %.not6392, label %.lr.ph94, label %.critedge83

135:                                              ; preds = %.critedge
  %136 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  br label %306

.lr.ph94:                                         ; preds = %.preheader86, %146
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %146 ], [ 0, %.preheader86 ]
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %indvars.iv109) #7
  %138 = load i32, ptr %137, align 4, !tbaa !8
  %.not62 = icmp eq i32 %138, 0
  br i1 %.not62, label %139, label %146

139:                                              ; preds = %.lr.ph94
  %140 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %indvars.iv109) #7
  %141 = call noundef zeroext i1 @_ZNKSt3setIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %140) #7
  br i1 %141, label %146, label %142

142:                                              ; preds = %139
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %303 unwind label %144

144:                                              ; preds = %142
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %306

146:                                              ; preds = %.lr.ph94, %139
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %147 = load i32, ptr %1, align 4, !tbaa !8
  %148 = sext i32 %147 to i64
  %.not63 = icmp slt i64 %indvars.iv.next110, %148
  br i1 %.not63, label %.lr.ph94, label %.critedge83, !llvm.loop !14

.critedge83:                                      ; preds = %146, %.preheader86
  %149 = phi i32 [ %134, %.preheader86 ], [ %147, %146 ]
  %150 = add nsw i32 %149, -1
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %151) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 0, ptr %16, align 4, !tbaa !8
  %153 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %152, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %154 unwind label %201

154:                                              ; preds = %.critedge83
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #7
  %155 = load i32, ptr %1, align 4, !tbaa !8
  %156 = sext i32 %155 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %156, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %157 unwind label %203

157:                                              ; preds = %154
  %158 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @s, ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %19) #7
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
          to label %159 unwind label %205

159:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #7
  store i32 0, ptr %20, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %160 unwind label %207

160:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef 0) #7
  store i32 1, ptr %161, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #7
  %162 = load i32, ptr %1, align 4, !tbaa !8
  %163 = sext i32 %162 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #7
  call void @_ZNSaISt3setIiSt4lessIiESaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %163, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %164 unwind label %209

164:                                              ; preds = %160
  %165 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEaSEOS6_(ptr noundef nonnull align 8 dereferenceable(24) @ci, ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @_ZNSt15__new_allocatorISt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #7
  %166 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
  br i1 %166, label %.preheader85, label %.lr.ph96

.preheader85:                                     ; preds = %247, %164
  %167 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef 0) #7
  %168 = call noundef zeroext i1 @_ZNKSt3setIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %167) #7
  br i1 %168, label %.preheader84, label %.lr.ph97

.lr.ph96:                                         ; preds = %164, %247
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #7
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
  %170 = load i32, ptr %169, align 4, !tbaa !8
  store i32 %170, ptr %23, align 4, !tbaa !8
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
  br label %171

171:                                              ; preds = %246, %.lr.ph96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  %172 = load i32, ptr %23, align 4, !tbaa !8
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %173) #7
  %175 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %174) #7
  store ptr %175, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #7
  %176 = load i32, ptr %23, align 4, !tbaa !8
  %177 = sext i32 %176 to i64
  %178 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %177) #7
  %179 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %178) #7
  store ptr %179, ptr %25, align 8
  %180 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  br i1 %180, label %181, label %247

181:                                              ; preds = %171
  %182 = load i32, ptr %23, align 4, !tbaa !8
  %183 = sext i32 %182 to i64
  %184 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef %183) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #7
  %185 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @cc) #7
  %186 = trunc i64 %185 to i32
  store i32 %186, ptr %26, align 4, !tbaa !8
  %187 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %184, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %188 unwind label %211

188:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %28) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 1, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %189 unwind label %213

189:                                              ; preds = %188
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @cc, ptr noundef nonnull align 8 dereferenceable(24) %27)
          to label %190 unwind label %215

190:                                              ; preds = %189
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #7
  br label %191

191:                                              ; preds = %241, %190
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #7
  %192 = load i32, ptr %23, align 4, !tbaa !8
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %193) #7
  %195 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %194) #7
  store ptr %195, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #7
  %196 = load i32, ptr %23, align 4, !tbaa !8
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %197) #7
  %199 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %198) #7
  store ptr %199, ptr %30, align 8
  %200 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  br i1 %200, label %246, label %218

201:                                              ; preds = %.critedge83
  %202 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %306

203:                                              ; preds = %154
  %204 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #7
  br label %306

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

207:                                              ; preds = %159
  %208 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  br label %304

209:                                              ; preds = %160
  %210 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #7
  br label %304

211:                                              ; preds = %181
  %212 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  br label %249

213:                                              ; preds = %188
  %214 = landingpad { ptr, i32 }
          cleanup
  br label %217

215:                                              ; preds = %189
  %216 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  br label %217

217:                                              ; preds = %215, %213
  %.pn68 = phi { ptr, i32 } [ %216, %215 ], [ %214, %213 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #7
  br label %249

218:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #7
  %219 = load i32, ptr %23, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %220) #7
  %222 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %221) #7
  store ptr %222, ptr %32, align 8
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  %224 = load i32, ptr %223, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #7
  store i32 %224, ptr %31, align 4, !tbaa !8
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %225) #7
  %227 = load i32, ptr %226, align 4, !tbaa !8
  %.not70 = icmp eq i32 %227, 0
  br i1 %.not70, label %228, label %234

228:                                              ; preds = %218
  %229 = load i32, ptr %31, align 4, !tbaa !8
  %230 = sext i32 %229 to i64
  %231 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %230) #7
  store i32 1, ptr %231, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %234 unwind label %232

232:                                              ; preds = %239, %234, %228
  %233 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #7
  br label %249

234:                                              ; preds = %228, %218
  %235 = load i32, ptr %23, align 4, !tbaa !8
  %236 = sext i32 %235 to i64
  %237 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %236) #7
  %238 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %237, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %239 unwind label %232

239:                                              ; preds = %234
  %240 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @cc) #7
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %240, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %241 unwind label %232

241:                                              ; preds = %239
  %242 = load i32, ptr %31, align 4, !tbaa !8
  store i32 %242, ptr %23, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #7
  %243 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @cc) #7
  %244 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %243, i64 noundef 0) #7
  %245 = load i32, ptr %244, align 4, !tbaa !8
  %.not75 = icmp eq i32 %242, %245
  br i1 %.not75, label %246, label %191, !llvm.loop !15

246:                                              ; preds = %191, %241
  br label %171, !llvm.loop !16

247:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  %248 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
  br i1 %248, label %.preheader85, label %.lr.ph96, !llvm.loop !17

249:                                              ; preds = %232, %217, %211
  %.pn71 = phi { ptr, i32 } [ %233, %232 ], [ %.pn68, %217 ], [ %212, %211 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  br label %304

.preheader84:                                     ; preds = %258, %.preheader85
  %250 = load i32, ptr %2, align 4, !tbaa !8
  %.not6498 = icmp slt i32 %250, 0
  br i1 %.not6498, label %._crit_edge101, label %.lr.ph100

.lr.ph97:                                         ; preds = %.preheader85, %258
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #7
  %251 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef 0) #7
  %252 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %251) #7
  store ptr %252, ptr %33, align 8
  %253 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef 0) #7
  %.sroa.016.0.copyload = load ptr, ptr %33, align 8, !tbaa !18
  %254 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %253, ptr %.sroa.016.0.copyload)
          to label %255 unwind label %261

255:                                              ; preds = %.lr.ph97
  %256 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #7
  %257 = load i32, ptr %256, align 4, !tbaa !8
  invoke void @_Z4dfs2i(i32 noundef %257)
          to label %258 unwind label %261

258:                                              ; preds = %255
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #7
  %259 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ci, i64 noundef 0) #7
  %260 = call noundef zeroext i1 @_ZNKSt3setIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %259) #7
  br i1 %260, label %.preheader84, label %.lr.ph97, !llvm.loop !20

261:                                              ; preds = %255, %.lr.ph97
  %262 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #7
  br label %304

.lr.ph100:                                        ; preds = %.preheader84, %.lr.ph100._crit_edge
  %indvars.iv112 = phi i64 [ %268, %.lr.ph100._crit_edge ], [ 0, %.preheader84 ]
  %263 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv112) #7
  %264 = load i32, ptr %263, align 4, !tbaa !8
  %265 = load i32, ptr %1, align 4, !tbaa !8
  %266 = add nsw i32 %265, -1
  %267 = icmp eq i32 %264, %266
  %268 = add nuw nsw i64 %indvars.iv112, 1
  br i1 %267, label %269, label %.lr.ph100._crit_edge

269:                                              ; preds = %.lr.ph100
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %268) #7
  %271 = load i32, ptr %270, align 4, !tbaa !8
  %272 = icmp eq i32 %271, 0
  br i1 %272, label %._crit_edge101.loopexit, label %.lr.ph100._crit_edge

.lr.ph100._crit_edge:                             ; preds = %.lr.ph100, %269
  %273 = load i32, ptr %2, align 4, !tbaa !8
  %274 = sext i32 %273 to i64
  %.not64.not = icmp slt i64 %indvars.iv112, %274
  br i1 %.not64.not, label %.lr.ph100, label %._crit_edge101.loopexit, !llvm.loop !21

._crit_edge101.loopexit:                          ; preds = %269, %.lr.ph100._crit_edge
  %.038.lcssa.ph.in = phi i64 [ %268, %.lr.ph100._crit_edge ], [ %indvars.iv112, %269 ]
  %.038.lcssa.ph = trunc i64 %.038.lcssa.ph.in to i32
  br label %._crit_edge101

._crit_edge101:                                   ; preds = %._crit_edge101.loopexit, %.preheader84
  %.038.lcssa = phi i32 [ 0, %.preheader84 ], [ %.038.lcssa.ph, %._crit_edge101.loopexit ]
  %275 = zext i32 %.038.lcssa to i64
  br label %276

276:                                              ; preds = %285, %._crit_edge101
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %285 ], [ %275, %._crit_edge101 ]
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %277 = load i32, ptr %2, align 4, !tbaa !8
  %278 = trunc nuw i64 %indvars.iv115 to i32
  %.not65.not = icmp sgt i32 %277, %278
  br i1 %.not65.not, label %280, label %.preheader.preheader

.preheader.preheader:                             ; preds = %276
  %279 = add nuw i32 %.038.lcssa, 1
  %wide.trip.count = zext i32 %279 to i64
  br label %.preheader

280:                                              ; preds = %276
  %281 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv.next116) #7
  %282 = load i32, ptr %281, align 4, !tbaa !8
  %283 = add nsw i32 %282, 1
  %284 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %283)
          to label %285 unwind label %287

285:                                              ; preds = %280
  %286 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %284, i8 noundef signext 32)
          to label %276 unwind label %287, !llvm.loop !22

287:                                              ; preds = %285, %280
  %288 = landingpad { ptr, i32 }
          cleanup
  br label %304

289:                                              ; preds = %300
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %19) #7
  br label %303

.preheader:                                       ; preds = %.preheader.preheader, %300
  %indvars.iv119 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next120, %300 ]
  %290 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv119) #7
  %291 = load i32, ptr %290, align 4, !tbaa !8
  %292 = add nsw i32 %291, 1
  %293 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %292)
          to label %294 unwind label %301

294:                                              ; preds = %.preheader
  %295 = icmp eq i64 %indvars.iv119, %275
  %296 = zext i1 %295 to i64
  %297 = getelementptr inbounds [3 x i8], ptr @.str.6, i64 0, i64 %296
  %298 = load i8, ptr %297, align 1, !tbaa !23
  %299 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %293, i8 noundef signext %298)
          to label %300 unwind label %301

300:                                              ; preds = %294
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next120, %wide.trip.count
  br i1 %exitcond.not, label %289, label %.preheader, !llvm.loop !24

301:                                              ; preds = %294, %.preheader
  %302 = landingpad { ptr, i32 }
          cleanup
  br label %304

303:                                              ; preds = %142, %126, %112, %289
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

304:                                              ; preds = %287, %301, %261, %249, %209, %207
  %.pn71.pn = phi { ptr, i32 } [ %.pn71, %249 ], [ %262, %261 ], [ %210, %209 ], [ %208, %207 ], [ %288, %287 ], [ %302, %301 ]
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19) #7
  br label %305

305:                                              ; preds = %304, %205
  %.pn71.pn.pn = phi { ptr, i32 } [ %.pn71.pn, %304 ], [ %206, %205 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %19) #7
  br label %306

306:                                              ; preds = %305, %203, %201, %144, %135, %128, %114, %98
  %.pn76 = phi { ptr, i32 } [ %99, %98 ], [ %115, %114 ], [ %.pn71.pn.pn, %305 ], [ %204, %203 ], [ %202, %201 ], [ %145, %144 ], [ %136, %135 ], [ %129, %128 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %307

307:                                              ; preds = %306, %68
  %.pn76.pn = phi { ptr, i32 } [ %.pn76, %306 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %308

308:                                              ; preds = %307, %66
  %.pn76.pn.pn = phi { ptr, i32 } [ %.pn76.pn, %307 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %309

309:                                              ; preds = %308, %64
  %.pn76.pn.pn.pn = phi { ptr, i32 } [ %.pn76.pn.pn, %308 ], [ %65, %64 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %310

310:                                              ; preds = %309, %62
  %.pn76.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn76.pn.pn.pn, %309 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn76.pn.pn.pn.pn
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(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 { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

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

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

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 @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

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

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

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

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

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

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

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


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