; LLVM IR from Izaron/ACM-ICPC :: Russian Council of School Olympiads (R.S.O.Sh.)/IOIP/IOIP 2016 (seating)

; 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<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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::set<std::pair<int, int>>, std::allocator<std::set<std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::set<std::pair<int, int>>, std::allocator<std::set<std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::set<std::pair<int, int>>, std::allocator<std::set<std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::set<std::pair<int, int>>, std::allocator<std::set<std::pair<int, 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::vector.10" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::pair.17" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@vec = external dso_local global %"class.std::vector", align 8
@delta = external dso_local global %"class.std::vector.0", align 8
@comp = external dso_local global i32, align 4
@comps = external dso_local global %"class.std::vector", align 8
@alls = external dso_local global %"class.std::vector.5", align 8
@used = external dso_local global %"class.std::vector.10", align 8
@ans = external dso_local global %"class.std::vector", align 8
@can = external dso_local global i8, align 1
@xmin = external dso_local global i32, align 4
@xmax = external dso_local global i32, align 4
@sums = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #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 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z9check_ansv() #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %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 i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair.17", align 8
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair.17", align 8
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair.17", align 8
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair.17", align 8
  %22 = alloca %"struct.std::pair", align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair.17", align 8
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::pair.17", align 8
  %28 = alloca i32, align 4
  %29 = alloca %"struct.std::_Bit_reference", align 8
  %30 = alloca ptr, align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %41 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %42 = load ptr, ptr @stdin, align 8, !tbaa !5
  %43 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.8, ptr noundef %42)
  %44 = load ptr, ptr @stdout, align 8, !tbaa !5
  %45 = call ptr @freopen(ptr noundef @.str.9, ptr noundef @.str.10, ptr noundef %44)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(4) @d)
  %48 = load i32, ptr @n, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %49)
  %50 = load i32, ptr @n, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @sums, i64 noundef %51)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %62, %0
  %53 = load i32, ptr %2, align 4, !tbaa !9
  %54 = load i32, ptr @n, align 4, !tbaa !9
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %65

57:                                               ; preds = %52
  %58 = load i32, ptr %2, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %59) #8
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %60)
  br label %62

62:                                               ; preds = %57
  %63 = load i32, ptr %2, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %2, align 4, !tbaa !9
  br label %52, !llvm.loop !11

65:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %90, %65
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = load i32, ptr @n, align 4, !tbaa !9
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 5, ptr %4, align 4
  br label %93

71:                                               ; preds = %66
  %72 = load i32, ptr %3, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %73) #8
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = load i32, ptr %3, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  %78 = load i32, ptr @n, align 4, !tbaa !9
  %79 = srem i32 %77, %78
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %80) #8
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = sub nsw i32 %75, %82
  %84 = call i32 @llvm.abs.i32(i32 %83, i1 true)
  %85 = icmp sgt i32 %84, 1
  br i1 %85, label %86, label %89

86:                                               ; preds = %71
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %93

89:                                               ; preds = %71
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %3, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %3, align 4, !tbaa !9
  br label %66, !llvm.loop !13

93:                                               ; preds = %86, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  %94 = load i32, ptr %4, align 4
  switch i32 %94, label %372 [
    i32 5, label %95
    i32 1, label %370
  ]

95:                                               ; preds = %93
  %96 = load i32, ptr @n, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  call void @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %97)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %190, %95
  %99 = load i32, ptr %5, align 4, !tbaa !9
  %100 = load i32, ptr @n, align 4, !tbaa !9
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %193

103:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %104 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %104, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %105 = load i32, ptr %5, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  %107 = load i32, ptr @n, align 4, !tbaa !9
  %108 = srem i32 %106, %107
  store i32 %108, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %109 = load i32, ptr %5, align 4, !tbaa !9
  %110 = load i32, ptr @d, align 4, !tbaa !9
  %111 = sub nsw i32 %109, %110
  %112 = call noundef i32 @_Z2gri(i32 noundef %111)
  store i32 %112, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %113 = load i32, ptr %5, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  %115 = load i32, ptr @d, align 4, !tbaa !9
  %116 = add nsw i32 %114, %115
  %117 = call noundef i32 @_Z2gri(i32 noundef %116)
  store i32 %117, ptr %9, align 4, !tbaa !9
  %118 = load i32, ptr %6, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %119) #8
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = load i32, ptr %7, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %123) #8
  %125 = load i32, ptr %124, align 4, !tbaa !9
  %126 = icmp eq i32 %121, %125
  br i1 %126, label %127, label %144

127:                                              ; preds = %103
  %128 = load i32, ptr %8, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %129) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %131 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %130, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %132 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %133 = extractvalue { ptr, i8 } %131, 0
  store ptr %133, ptr %132, align 8
  %134 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %135 = extractvalue { ptr, i8 } %131, 1
  store i8 %135, ptr %134, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  %136 = load i32, ptr %9, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %137) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_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) %8, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %139 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %138, ptr noundef nonnull align 4 dereferenceable(8) %13)
  %140 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %141 = extractvalue { ptr, i8 } %139, 0
  store ptr %141, ptr %140, align 8
  %142 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %143 = extractvalue { ptr, i8 } %139, 1
  store i8 %143, ptr %142, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %189

144:                                              ; preds = %103
  %145 = load i32, ptr %6, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %146) #8
  %148 = load i32, ptr %147, align 4, !tbaa !9
  %149 = load i32, ptr %7, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %150) #8
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = icmp slt i32 %148, %152
  br i1 %153, label %154, label %171

154:                                              ; preds = %144
  %155 = load i32, ptr %8, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %156) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 1, ptr %17, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %158 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %157, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %159 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %160 = extractvalue { ptr, i8 } %158, 0
  store ptr %160, ptr %159, align 8
  %161 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %162 = extractvalue { ptr, i8 } %158, 1
  store i8 %162, ptr %161, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %163 = load i32, ptr %9, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %164) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 -1, ptr %20, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %166 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %165, ptr noundef nonnull align 4 dereferenceable(8) %19)
  %167 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 0
  %168 = extractvalue { ptr, i8 } %166, 0
  store ptr %168, ptr %167, align 8
  %169 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 1
  %170 = extractvalue { ptr, i8 } %166, 1
  store i8 %170, ptr %169, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %188

171:                                              ; preds = %144
  %172 = load i32, ptr %8, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %173) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 -1, ptr %23, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %175 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %174, ptr noundef nonnull align 4 dereferenceable(8) %22)
  %176 = getelementptr inbounds { ptr, i8 }, ptr %24, i32 0, i32 0
  %177 = extractvalue { ptr, i8 } %175, 0
  store ptr %177, ptr %176, align 8
  %178 = getelementptr inbounds { ptr, i8 }, ptr %24, i32 0, i32 1
  %179 = extractvalue { ptr, i8 } %175, 1
  store i8 %179, ptr %178, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  %180 = load i32, ptr %9, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %181) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 1, ptr %26, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %183 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %182, ptr noundef nonnull align 4 dereferenceable(8) %25)
  %184 = getelementptr inbounds { ptr, i8 }, ptr %27, i32 0, i32 0
  %185 = extractvalue { ptr, i8 } %183, 0
  store ptr %185, ptr %184, align 8
  %186 = getelementptr inbounds { ptr, i8 }, ptr %27, i32 0, i32 1
  %187 = extractvalue { ptr, i8 } %183, 1
  store i8 %187, ptr %186, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %188

188:                                              ; preds = %171, %154
  br label %189

189:                                              ; preds = %188, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %5, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %5, align 4, !tbaa !9
  br label %98, !llvm.loop !14

193:                                              ; preds = %102
  %194 = load i32, ptr @n, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  call void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) @used, i64 noundef %195, i1 noundef zeroext false)
  %196 = load i32, ptr @n, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %197)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %198

198:                                              ; preds = %255, %193
  %199 = load i32, ptr %28, align 4, !tbaa !9
  %200 = load i32, ptr @n, align 4, !tbaa !9
  %201 = icmp slt i32 %199, %200
  br i1 %201, label %203, label %202

202:                                              ; preds = %198
  store i32 11, ptr %4, align 4
  br label %258

203:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  %204 = load i32, ptr %28, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @used, i64 noundef %205)
  %207 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 0
  %208 = extractvalue { ptr, i64 } %206, 0
  store ptr %208, ptr %207, align 8
  %209 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 1
  %210 = extractvalue { ptr, i64 } %206, 1
  store i64 %210, ptr %209, align 8
  %211 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  br i1 %211, label %212, label %213

212:                                              ; preds = %203
  br label %255

213:                                              ; preds = %203
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @comps) #8
  store i32 2147483647, ptr @xmin, align 4, !tbaa !9
  store i32 -2147483648, ptr @xmax, align 4, !tbaa !9
  %214 = load i32, ptr @comp, align 4, !tbaa !9
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr @comp, align 4, !tbaa !9
  store i8 1, ptr @can, align 1, !tbaa !15
  %216 = load i32, ptr %28, align 4, !tbaa !9
  call void @_Z3dfsii(i32 noundef %216, i32 noundef 0)
  %217 = load i8, ptr @can, align 1, !tbaa !15, !range !17, !noundef !18
  %218 = trunc i8 %217 to i1
  br i1 %218, label %222, label %219

219:                                              ; preds = %213
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %220, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %258

222:                                              ; preds = %213
  %223 = load i32, ptr @xmax, align 4, !tbaa !9
  %224 = load i32, ptr @xmin, align 4, !tbaa !9
  %225 = sub nsw i32 %223, %224
  %226 = icmp sgt i32 %225, 1
  br i1 %226, label %227, label %230

227:                                              ; preds = %222
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %258

230:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  store ptr @comps, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %231 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @comps) #8
  %232 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %231, ptr %232, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %233 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @comps) #8
  %234 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %233, ptr %234, align 8
  br label %235

235:                                              ; preds = %247, %230
  %236 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  br i1 %236, label %238, label %237

237:                                              ; preds = %235
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %249

238:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %239 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  %240 = load i32, ptr %239, align 4, !tbaa !9
  store i32 %240, ptr %33, align 4, !tbaa !9
  %241 = load i32, ptr @xmin, align 4, !tbaa !9
  %242 = load i32, ptr %33, align 4, !tbaa !9
  %243 = sext i32 %242 to i64
  %244 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %243) #8
  %245 = load i32, ptr %244, align 4, !tbaa !9
  %246 = sub nsw i32 %245, %241
  store i32 %246, ptr %244, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %247

247:                                              ; preds = %238
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  br label %235

249:                                              ; preds = %237
  %250 = load i32, ptr @xmin, align 4, !tbaa !9
  %251 = load i32, ptr @xmax, align 4, !tbaa !9
  %252 = icmp eq i32 %250, %251
  br i1 %252, label %253, label %254

253:                                              ; preds = %249
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) @alls, ptr noundef nonnull align 8 dereferenceable(24) @comps)
  br label %254

254:                                              ; preds = %253, %249
  br label %255

255:                                              ; preds = %254, %212
  %256 = load i32, ptr %28, align 4, !tbaa !9
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %28, align 4, !tbaa !9
  br label %198, !llvm.loop !19

258:                                              ; preds = %227, %219, %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  %259 = load i32, ptr %4, align 4
  switch i32 %259, label %372 [
    i32 11, label %260
    i32 1, label %370
  ]

260:                                              ; preds = %258
  %261 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %262 = icmp ugt i64 %261, 0
  br i1 %262, label %263, label %345

263:                                              ; preds = %260
  %264 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %265 = icmp ule i64 %264, 10
  br i1 %265, label %266, label %308

266:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  store i32 0, ptr %34, align 4, !tbaa !9
  br label %267

267:                                              ; preds = %303, %266
  %268 = load i32, ptr %34, align 4, !tbaa !9
  %269 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %270 = trunc i64 %269 to i32
  %271 = shl i32 1, %270
  %272 = icmp slt i32 %268, %271
  br i1 %272, label %274, label %273

273:                                              ; preds = %267
  store i32 16, ptr %4, align 4
  br label %306

274:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %275

275:                                              ; preds = %296, %274
  %276 = load i32, ptr %35, align 4, !tbaa !9
  %277 = sext i32 %276 to i64
  %278 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %279 = icmp ult i64 %277, %278
  br i1 %279, label %281, label %280

280:                                              ; preds = %275
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %299

281:                                              ; preds = %275
  %282 = load i32, ptr %34, align 4, !tbaa !9
  %283 = load i32, ptr %35, align 4, !tbaa !9
  %284 = shl i32 1, %283
  %285 = and i32 %282, %284
  %286 = icmp eq i32 %285, 0
  br i1 %286, label %287, label %291

287:                                              ; preds = %281
  %288 = load i32, ptr %35, align 4, !tbaa !9
  %289 = sext i32 %288 to i64
  %290 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @alls, i64 noundef %289) #8
  call void @_Z6set_toRSt6vectorIiSaIiEEi(ptr noundef nonnull align 8 dereferenceable(24) %290, i32 noundef 0)
  br label %295

291:                                              ; preds = %281
  %292 = load i32, ptr %35, align 4, !tbaa !9
  %293 = sext i32 %292 to i64
  %294 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @alls, i64 noundef %293) #8
  call void @_Z6set_toRSt6vectorIiSaIiEEi(ptr noundef nonnull align 8 dereferenceable(24) %294, i32 noundef 1)
  br label %295

295:                                              ; preds = %291, %287
  br label %296

296:                                              ; preds = %295
  %297 = load i32, ptr %35, align 4, !tbaa !9
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %35, align 4, !tbaa !9
  br label %275, !llvm.loop !20

299:                                              ; preds = %280
  %300 = call noundef zeroext i1 @_Z9check_ansv()
  br i1 %300, label %301, label %302

301:                                              ; preds = %299
  store i32 16, ptr %4, align 4
  br label %306

302:                                              ; preds = %299
  br label %303

303:                                              ; preds = %302
  %304 = load i32, ptr %34, align 4, !tbaa !9
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %34, align 4, !tbaa !9
  br label %267, !llvm.loop !21

306:                                              ; preds = %301, %273
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %307

307:                                              ; preds = %306
  br label %344

308:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  store i32 0, ptr %36, align 4, !tbaa !9
  br label %309

309:                                              ; preds = %319, %308
  %310 = load i32, ptr %36, align 4, !tbaa !9
  %311 = sext i32 %310 to i64
  %312 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %313 = icmp ult i64 %311, %312
  br i1 %313, label %315, label %314

314:                                              ; preds = %309
  store i32 22, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %322

315:                                              ; preds = %309
  %316 = load i32, ptr %36, align 4, !tbaa !9
  %317 = sext i32 %316 to i64
  %318 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @alls, i64 noundef %317) #8
  call void @_Z6set_toRSt6vectorIiSaIiEEi(ptr noundef nonnull align 8 dereferenceable(24) %318, i32 noundef 0)
  br label %319

319:                                              ; preds = %315
  %320 = load i32, ptr %36, align 4, !tbaa !9
  %321 = add nsw i32 %320, 1
  store i32 %321, ptr %36, align 4, !tbaa !9
  br label %309, !llvm.loop !22

322:                                              ; preds = %314
  %323 = call noundef zeroext i1 @_Z9check_ansv()
  br i1 %323, label %343, label %324

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

325:                                              ; preds = %338, %324
  %326 = load i32, ptr %37, align 4, !tbaa !9
  %327 = sext i32 %326 to i64
  %328 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %329 = icmp ult i64 %327, %328
  br i1 %329, label %331, label %330

330:                                              ; preds = %325
  store i32 25, ptr %4, align 4
  br label %341

331:                                              ; preds = %325
  %332 = load i32, ptr %37, align 4, !tbaa !9
  %333 = sext i32 %332 to i64
  %334 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @alls, i64 noundef %333) #8
  call void @_Z6set_toRSt6vectorIiSaIiEEi(ptr noundef nonnull align 8 dereferenceable(24) %334, i32 noundef 1)
  %335 = call noundef zeroext i1 @_Z9check_ansv()
  br i1 %335, label %336, label %337

336:                                              ; preds = %331
  store i32 25, ptr %4, align 4
  br label %341

337:                                              ; preds = %331
  br label %338

338:                                              ; preds = %337
  %339 = load i32, ptr %37, align 4, !tbaa !9
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %37, align 4, !tbaa !9
  br label %325, !llvm.loop !23

341:                                              ; preds = %336, %330
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %342

342:                                              ; preds = %341
  br label %343

343:                                              ; preds = %342, %322
  br label %344

344:                                              ; preds = %343, %307
  br label %345

345:                                              ; preds = %344, %260
  %346 = call noundef zeroext i1 @_Z9check_ansv()
  br i1 %346, label %350, label %347

347:                                              ; preds = %345
  %348 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
  %349 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %348, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %370

350:                                              ; preds = %345
  %351 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.12)
  %352 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %351, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  store ptr @ans, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %353 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %354 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  store ptr %353, ptr %354, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %355 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %356 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %40, i32 0, i32 0
  store ptr %355, ptr %356, align 8
  br label %357

357:                                              ; preds = %366, %350
  %358 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  br i1 %358, label %360, label %359

359:                                              ; preds = %357
  store i32 28, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %368

360:                                              ; preds = %357
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %361 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %362 = load i32, ptr %361, align 4, !tbaa !9
  store i32 %362, ptr %41, align 4, !tbaa !9
  %363 = load i32, ptr %41, align 4, !tbaa !9
  %364 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %363)
  %365 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %364, ptr noundef @.str.13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  br label %366

366:                                              ; preds = %360
  %367 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  br label %357

368:                                              ; preds = %359
  %369 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %370

370:                                              ; preds = %368, %347, %258, %93
  %371 = load i32, ptr %1, align 4
  ret i32 %371

372:                                              ; preds = %258, %93
  unreachable
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #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 uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_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 uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) #1 align 2

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

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

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

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 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !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<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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::set<std::pair<int, int>>, std::allocator<std::set<std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::set<std::pair<int, int>>, std::allocator<std::set<std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::set<std::pair<int, int>>, std::allocator<std::set<std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::set<std::pair<int, int>>, std::allocator<std::set<std::pair<int, 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::vector.10" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@vec = external dso_local global %"class.std::vector", align 8
@delta = external dso_local global %"class.std::vector.0", align 8
@comp = external dso_local local_unnamed_addr global i32, align 4
@comps = external dso_local global %"class.std::vector", align 8
@alls = external dso_local global %"class.std::vector.5", align 8
@used = external dso_local global %"class.std::vector.10", align 8
@ans = external dso_local global %"class.std::vector", align 8
@can = external dso_local local_unnamed_addr global i8, align 1
@xmin = external dso_local local_unnamed_addr global i32, align 4
@xmax = external dso_local local_unnamed_addr global i32, align 4
@sums = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; 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 uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) 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 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z9check_ansv() local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = load ptr, ptr @stdin, align 8, !tbaa !5
  %21 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.8, ptr noundef %20)
  %22 = load ptr, ptr @stdout, align 8, !tbaa !5
  %23 = tail call ptr @freopen(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, ptr noundef %22)
  %24 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %25 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) @d)
  %26 = load i32, ptr @n, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %27)
  %28 = load i32, ptr @n, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @sums, i64 noundef %29)
  %30 = load i32, ptr @n, align 4, !tbaa !9
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph, label %.preheader76.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %indvars.iv) #8
  %33 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %34 = load i32, ptr @n, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next, %35
  br i1 %36, label %.lr.ph, label %.preheader76.preheader, !llvm.loop !11

.preheader76.preheader:                           ; preds = %.lr.ph, %0
  br label %.preheader76

.preheader76:                                     ; preds = %.preheader76.preheader, %40
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %40 ], [ 0, %.preheader76.preheader ]
  %37 = load i32, ptr @n, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = icmp slt i64 %indvars.iv108, %38
  br i1 %39, label %40, label %55

40:                                               ; preds = %.preheader76
  %41 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %indvars.iv108) #8
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %43 = load i32, ptr @n, align 4, !tbaa !9
  %44 = trunc nuw i64 %indvars.iv.next109 to i32
  %45 = srem i32 %44, %43
  %46 = zext nneg i32 %45 to i64
  %47 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %46) #8
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = sub nsw i32 %42, %48
  %50 = tail call i32 @llvm.abs.i32(i32 %49, i1 true)
  %51 = icmp ugt i32 %50, 1
  br i1 %51, label %52, label %.preheader76, !llvm.loop !13

52:                                               ; preds = %40
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.thread68

55:                                               ; preds = %.preheader76
  tail call void @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %38)
  %56 = load i32, ptr @n, align 4, !tbaa !9
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %.lr.ph79, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %55
  %.pre = sext i32 %56 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %109, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %111, %109 ]
  call void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) @used, i64 noundef %.pre-phi, i1 noundef zeroext false)
  %58 = load i32, ptr @n, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %59)
  %60 = load i32, ptr @n, align 4, !tbaa !9
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %.lr.ph85, label %._crit_edge86

.lr.ph85:                                         ; preds = %._crit_edge
  %62 = getelementptr inbounds i8, ptr %15, i64 8
  br label %113

.lr.ph79:                                         ; preds = %55, %109
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %109 ], [ 0, %55 ]
  %63 = phi i32 [ %110, %109 ], [ %56, %55 ]
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %64 = trunc nuw nsw i64 %indvars.iv.next112 to i32
  %65 = srem i32 %64, %63
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %66 = load i32, ptr @d, align 4, !tbaa !9
  %67 = trunc nuw nsw i64 %indvars.iv111 to i32
  %68 = sub nsw i32 %67, %66
  %69 = call noundef i32 @_Z2gri(i32 noundef %68)
  store i32 %69, ptr %1, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %70 = load i32, ptr @d, align 4, !tbaa !9
  %71 = add nsw i32 %70, %64
  %72 = call noundef i32 @_Z2gri(i32 noundef %71)
  store i32 %72, ptr %2, align 4, !tbaa !9
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %indvars.iv111) #8
  %74 = load i32, ptr %73, align 4, !tbaa !9
  %75 = zext nneg i32 %65 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %75) #8
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = icmp eq i32 %74, %77
  br i1 %78, label %79, label %88

79:                                               ; preds = %.lr.ph79
  %80 = load i32, ptr %1, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %81) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %83 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %82, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %84 = load i32, ptr %2, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %85) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %87 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %86, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %109

88:                                               ; preds = %.lr.ph79
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %indvars.iv111) #8
  %90 = load i32, ptr %89, align 4, !tbaa !9
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %75) #8
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = icmp slt i32 %90, %92
  %94 = load i32, ptr %1, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %95) #8
  br i1 %93, label %97, label %103

97:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 1, ptr %8, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %98 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %96, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %99 = load i32, ptr %2, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %100) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 -1, ptr %10, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %102 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %101, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %109

103:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 -1, ptr %12, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %104 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %96, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  %105 = load i32, ptr %2, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setISt4pairIiiESt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %106) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  store i32 1, ptr %14, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_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) %1, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %108 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %107, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %109

109:                                              ; preds = %97, %103, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %110 = load i32, ptr @n, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = icmp slt i64 %indvars.iv.next112, %111
  br i1 %112, label %.lr.ph79, label %._crit_edge, !llvm.loop !14

113:                                              ; preds = %.lr.ph85, %152
  %indvars.iv114 = phi i64 [ 0, %.lr.ph85 ], [ %indvars.iv.next115, %152 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  %114 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @used, i64 noundef %indvars.iv114)
  %115 = extractvalue { ptr, i64 } %114, 0
  store ptr %115, ptr %15, align 8
  %116 = extractvalue { ptr, i64 } %114, 1
  store i64 %116, ptr %62, align 8
  %117 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  br i1 %117, label %152, label %118

118:                                              ; preds = %113
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @comps) #8
  store i32 2147483647, ptr @xmin, align 4, !tbaa !9
  store i32 -2147483648, ptr @xmax, align 4, !tbaa !9
  %119 = load i32, ptr @comp, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr @comp, align 4, !tbaa !9
  store i8 1, ptr @can, align 1, !tbaa !15
  %121 = trunc nuw nsw i64 %indvars.iv114 to i32
  call void @_Z3dfsii(i32 noundef %121, i32 noundef 0)
  %122 = load i8, ptr @can, align 1, !tbaa !15, !range !17, !noundef !18
  %123 = trunc nuw i8 %122 to i1
  br i1 %123, label %127, label %124

124:                                              ; preds = %118
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.thread68

127:                                              ; preds = %118
  %128 = load i32, ptr @xmax, align 4, !tbaa !9
  %129 = load i32, ptr @xmin, align 4, !tbaa !9
  %130 = sub nsw i32 %128, %129
  %131 = icmp sgt i32 %130, 1
  br i1 %131, label %132, label %135

132:                                              ; preds = %127
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.thread68

135:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %136 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @comps) #8
  store ptr %136, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %137 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @comps) #8
  store ptr %137, ptr %17, align 8
  %138 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %138, label %.lr.ph81, label %._crit_edge82

._crit_edge82:                                    ; preds = %.lr.ph81, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  %139 = load i32, ptr @xmin, align 4, !tbaa !9
  %140 = load i32, ptr @xmax, align 4, !tbaa !9
  %141 = icmp eq i32 %139, %140
  br i1 %141, label %151, label %152

.lr.ph81:                                         ; preds = %135, %.lr.ph81
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %143 = load i32, ptr %142, align 4, !tbaa !9
  %144 = load i32, ptr @xmin, align 4, !tbaa !9
  %145 = sext i32 %143 to i64
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %145) #8
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = sub nsw i32 %147, %144
  store i32 %148, ptr %146, align 4, !tbaa !9
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %150 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %150, label %.lr.ph81, label %._crit_edge82

151:                                              ; preds = %._crit_edge82
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) @alls, ptr noundef nonnull align 8 dereferenceable(24) @comps)
  br label %152

152:                                              ; preds = %._crit_edge82, %151, %113
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %153 = load i32, ptr @n, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = icmp slt i64 %indvars.iv.next115, %154
  br i1 %155, label %113, label %._crit_edge86, !llvm.loop !19

._crit_edge86:                                    ; preds = %152, %._crit_edge
  %156 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %.not = icmp eq i64 %156, 0
  br i1 %.not, label %.loopexit, label %157

157:                                              ; preds = %._crit_edge86
  %158 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %159 = icmp ult i64 %158, 11
  %160 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  br i1 %159, label %.preheader72, label %.preheader75

.preheader75:                                     ; preds = %157
  %.not101 = icmp eq i64 %160, 0
  br i1 %.not101, label %._crit_edge89, label %.lr.ph88

.preheader72:                                     ; preds = %157
  %161 = and i64 %160, 4294967295
  %.not103 = icmp eq i64 %161, 31
  br i1 %.not103, label %.loopexit, label %.preheader

162:                                              ; preds = %._crit_edge95
  %163 = add nuw nsw i32 %.05496, 1
  %164 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %165 = trunc i64 %164 to i32
  %166 = shl nuw i32 1, %165
  %167 = icmp slt i32 %163, %166
  br i1 %167, label %.preheader, label %.loopexit, !llvm.loop !20

.preheader:                                       ; preds = %.preheader72, %162
  %.05496 = phi i32 [ %163, %162 ], [ 0, %.preheader72 ]
  %168 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %.not104 = icmp eq i64 %168, 0
  br i1 %.not104, label %._crit_edge95, label %.lr.ph94

._crit_edge95:                                    ; preds = %.lr.ph94, %.preheader
  %169 = call noundef zeroext i1 @_Z9check_ansv()
  br i1 %169, label %.loopexit, label %162

.lr.ph94:                                         ; preds = %.preheader, %.lr.ph94
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %.lr.ph94 ], [ 0, %.preheader ]
  %170 = trunc nuw nsw i64 %indvars.iv123 to i32
  %171 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @alls, i64 noundef %indvars.iv123) #8
  %172 = lshr i32 %.05496, %170
  %. = and i32 %172, 1
  call void @_Z6set_toRSt6vectorIiSaIiEEi(ptr noundef nonnull align 8 dereferenceable(24) %171, i32 noundef %.)
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %173 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %174 = icmp ugt i64 %173, %indvars.iv.next124
  br i1 %174, label %.lr.ph94, label %._crit_edge95, !llvm.loop !21

._crit_edge89:                                    ; preds = %.lr.ph88, %.preheader75
  %175 = call noundef zeroext i1 @_Z9check_ansv()
  br i1 %175, label %.loopexit, label %.preheader73

.preheader73:                                     ; preds = %._crit_edge89
  %176 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %.not102 = icmp eq i64 %176, 0
  br i1 %.not102, label %.loopexit, label %.lr.ph91

.lr.ph88:                                         ; preds = %.preheader75, %.lr.ph88
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %.lr.ph88 ], [ 0, %.preheader75 ]
  %177 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @alls, i64 noundef %indvars.iv117) #8
  call void @_Z6set_toRSt6vectorIiSaIiEEi(ptr noundef nonnull align 8 dereferenceable(24) %177, i32 noundef 0)
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %178 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %179 = icmp ugt i64 %178, %indvars.iv.next118
  br i1 %179, label %.lr.ph88, label %._crit_edge89, !llvm.loop !22

180:                                              ; preds = %.lr.ph91
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %181 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @alls) #8
  %182 = icmp ugt i64 %181, %indvars.iv.next121
  br i1 %182, label %.lr.ph91, label %.loopexit, !llvm.loop !23

.lr.ph91:                                         ; preds = %.preheader73, %180
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %180 ], [ 0, %.preheader73 ]
  %183 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @alls, i64 noundef %indvars.iv120) #8
  call void @_Z6set_toRSt6vectorIiSaIiEEi(ptr noundef nonnull align 8 dereferenceable(24) %183, i32 noundef 1)
  %184 = call noundef zeroext i1 @_Z9check_ansv()
  br i1 %184, label %.loopexit, label %180

.loopexit:                                        ; preds = %.lr.ph91, %180, %._crit_edge95, %162, %.preheader73, %.preheader72, %._crit_edge89, %._crit_edge86
  %185 = call noundef zeroext i1 @_Z9check_ansv()
  br i1 %185, label %189, label %186

186:                                              ; preds = %.loopexit
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %187, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.thread68

189:                                              ; preds = %.loopexit
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.12)
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %190, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %192 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  store ptr %192, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  %193 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  store ptr %193, ptr %19, align 8
  %194 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br i1 %194, label %.lr.ph99, label %._crit_edge100

._crit_edge100:                                   ; preds = %.lr.ph99, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.thread68

.lr.ph99:                                         ; preds = %189, %.lr.ph99
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %197 = load i32, ptr %196, align 4, !tbaa !9
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %197)
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef nonnull @.str.13)
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %201 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br i1 %201, label %.lr.ph99, label %._crit_edge100

.thread68:                                        ; preds = %124, %132, %52, %._crit_edge100, %186
  ret i32 0
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_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 uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) local_unnamed_addr #1 align 2

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

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

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

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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


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