; LLVM IR from DionysiosB/CodeForces :: 0400-0499 (420B-OnlineMeeting)

; 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::_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::allocator.0" = type { i8 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::allocator.0", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::set", align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca i64, align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %24 = alloca %"struct.std::_Bit_reference", align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca %"struct.std::_Bit_reference", align 8
  %27 = alloca %"struct.std::_Bit_reference", align 8
  %28 = alloca i64, align 8
  %29 = alloca %"struct.std::_Bit_reference", align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca %"struct.std::_Bit_reference", align 8
  %33 = alloca i64, align 8
  %34 = alloca %"struct.std::_Bit_reference", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !5
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #6
  %36 = load i64, ptr %2, align 8, !tbaa !5
  %37 = add nsw i64 %36, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  store i8 1, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %38 unwind label %61

38:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #6
  call void @_ZNSt3setIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %249, %38
  %40 = load i64, ptr %3, align 8, !tbaa !5
  %41 = add nsw i64 %40, -1
  store i64 %41, ptr %3, align 8, !tbaa !5
  %42 = icmp ne i64 %40, 0
  br i1 %42, label %43, label %251

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %44 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %12, ptr noundef %13)
          to label %45 unwind label %65

45:                                               ; preds = %43
  %46 = load i8, ptr %12, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 43
  br i1 %48, label %49, label %139

49:                                               ; preds = %45
  %50 = call noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  %51 = icmp ugt i64 %50, 0
  br i1 %51, label %52, label %73

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %53 = load i64, ptr %13, align 8, !tbaa !5
  %54 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %53)
          to label %55 unwind label %69

55:                                               ; preds = %52
  %56 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %57 = extractvalue { ptr, i64 } %54, 0
  store ptr %57, ptr %56, align 8
  %58 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %59 = extractvalue { ptr, i64 } %54, 1
  store i64 %59, ptr %58, align 8
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %14, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br label %132

61:                                               ; preds = %0
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %7, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  br label %324

65:                                               ; preds = %247, %242, %189, %132, %43
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %7, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %8, align 4
  br label %250

69:                                               ; preds = %52
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br label %250

73:                                               ; preds = %49
  %74 = load i64, ptr %10, align 8, !tbaa !5
  %75 = icmp sgt i64 %74, 0
  br i1 %75, label %76, label %93

76:                                               ; preds = %73
  %77 = load i64, ptr %10, align 8, !tbaa !5
  %78 = load i64, ptr %13, align 8, !tbaa !5
  %79 = icmp ne i64 %77, %78
  br i1 %79, label %80, label %93

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %81 = load i64, ptr %13, align 8, !tbaa !5
  %82 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %81)
          to label %83 unwind label %89

83:                                               ; preds = %80
  %84 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %85 = extractvalue { ptr, i64 } %82, 0
  store ptr %85, ptr %84, align 8
  %86 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %87 = extractvalue { ptr, i64 } %82, 1
  store i64 %87, ptr %86, align 8
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %131

89:                                               ; preds = %80
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %7, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %250

93:                                               ; preds = %76, %73
  %94 = load i64, ptr %10, align 8, !tbaa !5
  %95 = icmp eq i64 %94, 0
  br i1 %95, label %96, label %128

96:                                               ; preds = %93
  %97 = load i64, ptr %11, align 8, !tbaa !5
  %98 = icmp sgt i64 %97, 0
  br i1 %98, label %99, label %128

99:                                               ; preds = %96
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = load i64, ptr %13, align 8, !tbaa !5
  %102 = icmp ne i64 %100, %101
  br i1 %102, label %103, label %128

103:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %104 = load i64, ptr %11, align 8, !tbaa !5
  %105 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %104)
          to label %106 unwind label %120

106:                                              ; preds = %103
  %107 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %108 = extractvalue { ptr, i64 } %105, 0
  store ptr %108, ptr %107, align 8
  %109 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %110 = extractvalue { ptr, i64 } %105, 1
  store i64 %110, ptr %109, align 8
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %16, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %112 = load i64, ptr %13, align 8, !tbaa !5
  %113 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %112)
          to label %114 unwind label %124

114:                                              ; preds = %106
  %115 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %116 = extractvalue { ptr, i64 } %113, 0
  store ptr %116, ptr %115, align 8
  %117 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %118 = extractvalue { ptr, i64 } %113, 1
  store i64 %118, ptr %117, align 8
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %17, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br label %130

120:                                              ; preds = %103
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %7, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br label %250

124:                                              ; preds = %106
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %7, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br label %250

128:                                              ; preds = %99, %96, %93
  %129 = load i64, ptr %13, align 8, !tbaa !5
  store i64 %129, ptr %10, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %128, %114
  br label %131

131:                                              ; preds = %130, %83
  br label %132

132:                                              ; preds = %131, %55
  %133 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %134 unwind label %65

134:                                              ; preds = %132
  %135 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %136 = extractvalue { ptr, i8 } %133, 0
  store ptr %136, ptr %135, align 8
  %137 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %138 = extractvalue { ptr, i8 } %133, 1
  store i8 %138, ptr %137, align 8
  br label %210

139:                                              ; preds = %45
  %140 = load i64, ptr %13, align 8, !tbaa !5
  store i64 %140, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %141 = invoke ptr @_ZNSt3setIlSt4lessIlESaIlEE4findERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %142 unwind label %167

142:                                              ; preds = %139
  %143 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %141, ptr %143, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %144 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  %145 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %144, ptr %145, align 8
  %146 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br i1 %146, label %147, label %189

147:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @_ZNSt23_Rb_tree_const_iteratorIlEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %148 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  %149 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  store ptr %148, ptr %149, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %22, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %150

150:                                              ; preds = %164, %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %151 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  %152 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %23, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  %153 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br i1 %153, label %154, label %175

154:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  %156 = load i64, ptr %155, align 8, !tbaa !5
  %157 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %156)
          to label %158 unwind label %171

158:                                              ; preds = %154
  %159 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 0
  %160 = extractvalue { ptr, i64 } %157, 0
  store ptr %160, ptr %159, align 8
  %161 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 1
  %162 = extractvalue { ptr, i64 } %157, 1
  store i64 %162, ptr %161, align 8
  %163 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %24, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  br label %164

164:                                              ; preds = %158
  %165 = call ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEi(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef 0) #6
  %166 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %25, i32 0, i32 0
  store ptr %165, ptr %166, align 8
  br label %150, !llvm.loop !15

167:                                              ; preds = %139
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %7, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %250

171:                                              ; preds = %154
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %7, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  br label %188

175:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #6
  %176 = load i64, ptr %11, align 8, !tbaa !5
  %177 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %176)
          to label %178 unwind label %184

178:                                              ; preds = %175
  %179 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %180 = extractvalue { ptr, i64 } %177, 0
  store ptr %180, ptr %179, align 8
  %181 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %182 = extractvalue { ptr, i64 } %177, 1
  store i64 %182, ptr %181, align 8
  %183 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %26, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %209

184:                                              ; preds = %175
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %7, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  br label %188

188:                                              ; preds = %184, %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %250

189:                                              ; preds = %142
  %190 = invoke noundef i64 @_ZNSt3setIlSt4lessIlESaIlEE5eraseERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %191 unwind label %65

191:                                              ; preds = %189
  %192 = call noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  %193 = icmp ugt i64 %192, 0
  br i1 %193, label %194, label %207

194:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #6
  %195 = load i64, ptr %13, align 8, !tbaa !5
  %196 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %195)
          to label %197 unwind label %203

197:                                              ; preds = %194
  %198 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 0
  %199 = extractvalue { ptr, i64 } %196, 0
  store ptr %199, ptr %198, align 8
  %200 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 1
  %201 = extractvalue { ptr, i64 } %196, 1
  store i64 %201, ptr %200, align 8
  %202 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %27, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #6
  br label %208

203:                                              ; preds = %194
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %7, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #6
  br label %250

207:                                              ; preds = %191
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %208

208:                                              ; preds = %207, %197
  br label %209

209:                                              ; preds = %208, %178
  br label %210

210:                                              ; preds = %209, %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  store i64 1, ptr %28, align 8, !tbaa !5
  br label %211

211:                                              ; preds = %238, %210
  %212 = load i64, ptr %28, align 8, !tbaa !5
  %213 = load i64, ptr %2, align 8, !tbaa !5
  %214 = icmp sle i64 %212, %213
  br i1 %214, label %216, label %215

215:                                              ; preds = %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %242

216:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #6
  %217 = load i64, ptr %28, align 8, !tbaa !5
  %218 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %217)
          to label %219 unwind label %229

219:                                              ; preds = %216
  %220 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 0
  %221 = extractvalue { ptr, i64 } %218, 0
  store ptr %221, ptr %220, align 8
  %222 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 1
  %223 = extractvalue { ptr, i64 } %218, 1
  store i64 %223, ptr %222, align 8
  %224 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %29) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  br i1 %224, label %225, label %237

225:                                              ; preds = %219
  %226 = load i64, ptr %28, align 8, !tbaa !5
  %227 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %226)
          to label %228 unwind label %233

228:                                              ; preds = %225
  br label %237

229:                                              ; preds = %216
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %7, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  br label %241

233:                                              ; preds = %225
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %7, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %8, align 4
  br label %241

237:                                              ; preds = %228, %219
  br label %238

238:                                              ; preds = %237
  %239 = load i64, ptr %28, align 8, !tbaa !5
  %240 = add nsw i64 %239, 1
  store i64 %240, ptr %28, align 8, !tbaa !5
  br label %211, !llvm.loop !17

241:                                              ; preds = %233, %229
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %250

242:                                              ; preds = %215
  %243 = load i64, ptr %13, align 8, !tbaa !5
  %244 = load i64, ptr %10, align 8, !tbaa !5
  %245 = load i64, ptr %11, align 8, !tbaa !5
  %246 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %243, i64 noundef %244, i64 noundef %245)
          to label %247 unwind label %65

247:                                              ; preds = %242
  %248 = invoke i32 @puts(ptr noundef @.str.4)
          to label %249 unwind label %65

249:                                              ; preds = %247
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %39, !llvm.loop !18

250:                                              ; preds = %241, %203, %188, %167, %124, %120, %89, %69, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %323

251:                                              ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  store i64 0, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  store i64 1, ptr %31, align 8, !tbaa !5
  br label %252

252:                                              ; preds = %274, %251
  %253 = load i64, ptr %31, align 8, !tbaa !5
  %254 = load i64, ptr %2, align 8, !tbaa !5
  %255 = icmp sle i64 %253, %254
  br i1 %255, label %257, label %256

256:                                              ; preds = %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %277

257:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #6
  %258 = load i64, ptr %31, align 8, !tbaa !5
  %259 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %258)
          to label %260 unwind label %269

260:                                              ; preds = %257
  %261 = getelementptr inbounds { ptr, i64 }, ptr %32, i32 0, i32 0
  %262 = extractvalue { ptr, i64 } %259, 0
  store ptr %262, ptr %261, align 8
  %263 = getelementptr inbounds { ptr, i64 }, ptr %32, i32 0, i32 1
  %264 = extractvalue { ptr, i64 } %259, 1
  store i64 %264, ptr %263, align 8
  %265 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %32) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  br i1 %265, label %266, label %273

266:                                              ; preds = %260
  %267 = load i64, ptr %30, align 8, !tbaa !5
  %268 = add nsw i64 %267, 1
  store i64 %268, ptr %30, align 8, !tbaa !5
  br label %273

269:                                              ; preds = %257
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %7, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %322

273:                                              ; preds = %266, %260
  br label %274

274:                                              ; preds = %273
  %275 = load i64, ptr %31, align 8, !tbaa !5
  %276 = add nsw i64 %275, 1
  store i64 %276, ptr %31, align 8, !tbaa !5
  br label %252, !llvm.loop !19

277:                                              ; preds = %256
  %278 = invoke i32 @puts(ptr noundef @.str.5)
          to label %279 unwind label %288

279:                                              ; preds = %277
  %280 = load i64, ptr %30, align 8, !tbaa !5
  %281 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.6, i64 noundef %280)
          to label %282 unwind label %288

282:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  store i64 1, ptr %33, align 8, !tbaa !5
  br label %283

283:                                              ; preds = %314, %282
  %284 = load i64, ptr %33, align 8, !tbaa !5
  %285 = load i64, ptr %2, align 8, !tbaa !5
  %286 = icmp sle i64 %284, %285
  br i1 %286, label %292, label %287

287:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %318

288:                                              ; preds = %318, %279, %277
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %7, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %8, align 4
  br label %322

292:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #6
  %293 = load i64, ptr %33, align 8, !tbaa !5
  %294 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %293)
          to label %295 unwind label %305

295:                                              ; preds = %292
  %296 = getelementptr inbounds { ptr, i64 }, ptr %34, i32 0, i32 0
  %297 = extractvalue { ptr, i64 } %294, 0
  store ptr %297, ptr %296, align 8
  %298 = getelementptr inbounds { ptr, i64 }, ptr %34, i32 0, i32 1
  %299 = extractvalue { ptr, i64 } %294, 1
  store i64 %299, ptr %298, align 8
  %300 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #6
  br i1 %300, label %301, label %313

301:                                              ; preds = %295
  %302 = load i64, ptr %33, align 8, !tbaa !5
  %303 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %302)
          to label %304 unwind label %309

304:                                              ; preds = %301
  br label %313

305:                                              ; preds = %292
  %306 = landingpad { ptr, i32 }
          cleanup
  %307 = extractvalue { ptr, i32 } %306, 0
  store ptr %307, ptr %7, align 8
  %308 = extractvalue { ptr, i32 } %306, 1
  store i32 %308, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #6
  br label %317

309:                                              ; preds = %301
  %310 = landingpad { ptr, i32 }
          cleanup
  %311 = extractvalue { ptr, i32 } %310, 0
  store ptr %311, ptr %7, align 8
  %312 = extractvalue { ptr, i32 } %310, 1
  store i32 %312, ptr %8, align 4
  br label %317

313:                                              ; preds = %304, %295
  br label %314

314:                                              ; preds = %313
  %315 = load i64, ptr %33, align 8, !tbaa !5
  %316 = add nsw i64 %315, 1
  store i64 %316, ptr %33, align 8, !tbaa !5
  br label %283, !llvm.loop !20

317:                                              ; preds = %309, %305
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %322

318:                                              ; preds = %287
  %319 = invoke i32 @puts(ptr noundef @.str.4)
          to label %320 unwind label %288

320:                                              ; preds = %318
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %321 = load i32, ptr %1, align 4
  ret i32 %321

322:                                              ; preds = %317, %288, %269
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %323

323:                                              ; preds = %322, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #6
  br label %324

324:                                              ; preds = %323, %61
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %325

325:                                              ; preds = %324
  %326 = load ptr, ptr %7, align 8
  %327 = load i32, ptr %8, align 4
  %328 = insertvalue { ptr, i32 } poison, ptr %326, 0
  %329 = insertvalue { ptr, i32 } %328, i32 %327, 1
  resume { ptr, i32 } %329
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

declare i32 @puts(ptr noundef) #2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{i64 0, i64 8, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}


; 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::_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::allocator.0" = type { i8 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i8, align 1
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca %"class.std::set", align 8
  %7 = alloca i8, align 1
  %8 = alloca i64, align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = alloca %"struct.std::_Bit_reference", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca %"struct.std::_Bit_reference", align 8
  %21 = alloca %"struct.std::_Bit_reference", align 8
  %22 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  store i64 0, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store i64 0, ptr %2, align 8, !tbaa !5
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #5
  %24 = load i64, ptr %1, align 8, !tbaa !5
  %25 = add nsw i64 %24, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  store i8 1, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %26 unwind label %52

26:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  %27 = load i64, ptr %2, align 8, !tbaa !5
  %28 = add nsw i64 %27, -1
  store i64 %28, ptr %2, align 8, !tbaa !5
  %.not67 = icmp eq i64 %27, 0
  br i1 %.not67, label %.preheader, label %.lr.ph71

.lr.ph71:                                         ; preds = %26
  %29 = getelementptr inbounds i8, ptr %19, i64 8
  %30 = getelementptr inbounds i8, ptr %17, i64 8
  %31 = getelementptr inbounds i8, ptr %18, i64 8
  %32 = getelementptr inbounds i8, ptr %9, i64 8
  %33 = getelementptr inbounds i8, ptr %10, i64 8
  %34 = getelementptr inbounds i8, ptr %11, i64 8
  %35 = getelementptr inbounds i8, ptr %12, i64 8
  %36 = getelementptr inbounds i8, ptr %20, i64 8
  br label %39

.preheader:                                       ; preds = %._crit_edge66, %26
  %37 = load i64, ptr %1, align 8, !tbaa !5
  %.not4272 = icmp slt i64 %37, 1
  br i1 %.not4272, label %._crit_edge76, label %.lr.ph75

.lr.ph75:                                         ; preds = %.preheader
  %38 = getelementptr inbounds i8, ptr %21, i64 8
  br label %159

39:                                               ; preds = %.lr.ph71, %._crit_edge66
  %.03769 = phi i64 [ 0, %.lr.ph71 ], [ %.239, %._crit_edge66 ]
  %.04068 = phi i64 [ 0, %.lr.ph71 ], [ %.141, %._crit_edge66 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %41 = load i8, ptr %7, align 1, !tbaa !11
  %42 = icmp eq i8 %41, 43
  br i1 %42, label %43, label %90

43:                                               ; preds = %39
  %44 = call noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  %.not48 = icmp eq i64 %44, 0
  br i1 %.not48, label %58, label %45

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %46)
          to label %48 unwind label %56

48:                                               ; preds = %45
  %49 = extractvalue { ptr, i64 } %47, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i64 } %47, 1
  store i64 %50, ptr %32, align 8
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %88

52:                                               ; preds = %0
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %185

54:                                               ; preds = %122, %88
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %154

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %154

58:                                               ; preds = %43
  %59 = icmp slt i64 %.03769, 1
  %60 = load i64, ptr %8, align 8
  %.not49 = icmp eq i64 %.03769, %60
  %or.cond56 = select i1 %59, i1 true, i1 %.not49
  br i1 %or.cond56, label %69, label %61

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %62 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %60)
          to label %63 unwind label %67

63:                                               ; preds = %61
  %64 = extractvalue { ptr, i64 } %62, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i64 } %62, 1
  store i64 %65, ptr %33, align 8
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %88

67:                                               ; preds = %61
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %154

69:                                               ; preds = %58
  %70 = icmp ne i64 %.03769, 0
  %71 = icmp slt i64 %.04068, 1
  %or.cond.not60 = select i1 %70, i1 true, i1 %71
  %.not50 = icmp eq i64 %.04068, %60
  %or.cond57 = select i1 %or.cond.not60, i1 true, i1 %.not50
  br i1 %or.cond57, label %88, label %72

72:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %73 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %.04068)
          to label %74 unwind label %84

74:                                               ; preds = %72
  %75 = extractvalue { ptr, i64 } %73, 0
  store ptr %75, ptr %11, align 8
  %76 = extractvalue { ptr, i64 } %73, 1
  store i64 %76, ptr %34, align 8
  %77 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  %78 = load i64, ptr %8, align 8, !tbaa !5
  %79 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %78)
          to label %80 unwind label %86

80:                                               ; preds = %74
  %81 = extractvalue { ptr, i64 } %79, 0
  store ptr %81, ptr %12, align 8
  %82 = extractvalue { ptr, i64 } %79, 1
  store i64 %82, ptr %35, align 8
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %88

84:                                               ; preds = %72
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %154

86:                                               ; preds = %74
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %154

88:                                               ; preds = %69, %63, %80, %48
  %.138 = phi i64 [ %.03769, %48 ], [ %.03769, %63 ], [ 0, %80 ], [ %60, %69 ]
  %89 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %135 unwind label %54

90:                                               ; preds = %39
  %91 = load i64, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %92 = invoke ptr @_ZNSt3setIlSt4lessIlESaIlEE4findERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %93 unwind label %110

93:                                               ; preds = %90
  store ptr %92, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %94 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  store ptr %94, ptr %14, align 8
  %95 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br i1 %95, label %96, label %122

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  call void @_ZNSt23_Rb_tree_const_iteratorIlEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  %97 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  store ptr %97, ptr %15, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  %98 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  store ptr %98, ptr %16, align 8
  %99 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br i1 %99, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %96, %103
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #5
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  %101 = load i64, ptr %100, align 8, !tbaa !5
  %102 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %101)
          to label %103 unwind label %112

103:                                              ; preds = %.lr.ph
  %104 = extractvalue { ptr, i64 } %102, 0
  store ptr %104, ptr %17, align 8
  %105 = extractvalue { ptr, i64 } %102, 1
  store i64 %105, ptr %30, align 8
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %17, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  %107 = call ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  %108 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  store ptr %108, ptr %16, align 8
  %109 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br i1 %109, label %.lr.ph, label %._crit_edge, !llvm.loop !14

110:                                              ; preds = %90
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %154

112:                                              ; preds = %.lr.ph
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  br label %121

._crit_edge:                                      ; preds = %103, %96
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #5
  %114 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %91)
          to label %115 unwind label %119

115:                                              ; preds = %._crit_edge
  %116 = extractvalue { ptr, i64 } %114, 0
  store ptr %116, ptr %18, align 8
  %117 = extractvalue { ptr, i64 } %114, 1
  store i64 %117, ptr %31, align 8
  %118 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %18, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  br label %135

119:                                              ; preds = %._crit_edge
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  br label %121

121:                                              ; preds = %119, %112
  %.pn46 = phi { ptr, i32 } [ %113, %112 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  br label %154

122:                                              ; preds = %93
  %123 = invoke noundef i64 @_ZNSt3setIlSt4lessIlESaIlEE5eraseERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %124 unwind label %54

124:                                              ; preds = %122
  %125 = call noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  %.not45 = icmp eq i64 %125, 0
  br i1 %.not45, label %135, label %126

126:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #5
  %127 = load i64, ptr %8, align 8, !tbaa !5
  %128 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %127)
          to label %129 unwind label %133

129:                                              ; preds = %126
  %130 = extractvalue { ptr, i64 } %128, 0
  store ptr %130, ptr %19, align 8
  %131 = extractvalue { ptr, i64 } %128, 1
  store i64 %131, ptr %29, align 8
  %132 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #5
  br label %135

133:                                              ; preds = %126
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #5
  br label %154

135:                                              ; preds = %124, %88, %115, %129
  %.141 = phi i64 [ %91, %115 ], [ %91, %129 ], [ %.04068, %88 ], [ %91, %124 ]
  %.239 = phi i64 [ %.03769, %115 ], [ %.03769, %129 ], [ %.138, %88 ], [ 0, %124 ]
  %136 = load i64, ptr %1, align 8, !tbaa !5
  %.not5162 = icmp slt i64 %136, 1
  br i1 %.not5162, label %._crit_edge66, label %.lr.ph65

._crit_edge66:                                    ; preds = %151, %135
  %137 = load i64, ptr %8, align 8, !tbaa !5
  %138 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %137, i64 noundef %.239, i64 noundef %.141)
  %139 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  %140 = load i64, ptr %2, align 8, !tbaa !5
  %141 = add nsw i64 %140, -1
  store i64 %141, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i64 %140, 0
  br i1 %.not, label %.preheader, label %39, !llvm.loop !16

.lr.ph65:                                         ; preds = %135, %151
  %.02963 = phi i64 [ %152, %151 ], [ 1, %135 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #5
  %142 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %.02963)
          to label %143 unwind label %149

143:                                              ; preds = %.lr.ph65
  %144 = extractvalue { ptr, i64 } %142, 0
  store ptr %144, ptr %20, align 8
  %145 = extractvalue { ptr, i64 } %142, 1
  store i64 %145, ptr %36, align 8
  %146 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #5
  br i1 %146, label %147, label %151

147:                                              ; preds = %143
  %148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.02963)
  br label %151

149:                                              ; preds = %.lr.ph65
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #5
  br label %154

151:                                              ; preds = %143, %147
  %152 = add nuw nsw i64 %.02963, 1
  %153 = load i64, ptr %1, align 8, !tbaa !5
  %.not51.not = icmp slt i64 %.02963, %153
  br i1 %.not51.not, label %.lr.ph65, label %._crit_edge66, !llvm.loop !17

154:                                              ; preds = %149, %133, %121, %110, %86, %84, %67, %56, %54
  %.pn52 = phi { ptr, i32 } [ %150, %149 ], [ %55, %54 ], [ %57, %56 ], [ %68, %67 ], [ %87, %86 ], [ %85, %84 ], [ %.pn46, %121 ], [ %134, %133 ], [ %111, %110 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  br label %184

._crit_edge76:                                    ; preds = %161, %.preheader
  %.028.lcssa = phi i64 [ 0, %.preheader ], [ %spec.select, %161 ]
  %155 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  %156 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i64 noundef %.028.lcssa)
  %157 = load i64, ptr %1, align 8, !tbaa !5
  %.not4377 = icmp slt i64 %157, 1
  br i1 %.not4377, label %._crit_edge81, label %.lr.ph80

.lr.ph80:                                         ; preds = %._crit_edge76
  %158 = getelementptr inbounds i8, ptr %22, i64 8
  br label %171

159:                                              ; preds = %.lr.ph75, %161
  %.02774 = phi i64 [ 1, %.lr.ph75 ], [ %166, %161 ]
  %.02873 = phi i64 [ 0, %.lr.ph75 ], [ %spec.select, %161 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #5
  %160 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %.02774)
          to label %161 unwind label %168

161:                                              ; preds = %159
  %162 = extractvalue { ptr, i64 } %160, 0
  store ptr %162, ptr %21, align 8
  %163 = extractvalue { ptr, i64 } %160, 1
  store i64 %163, ptr %38, align 8
  %164 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #5
  %165 = zext i1 %164 to i64
  %spec.select = add nuw nsw i64 %.02873, %165
  %166 = add nuw nsw i64 %.02774, 1
  %167 = load i64, ptr %1, align 8, !tbaa !5
  %.not42.not = icmp slt i64 %.02774, %167
  br i1 %.not42.not, label %159, label %._crit_edge76, !llvm.loop !18

168:                                              ; preds = %159
  %169 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #5
  br label %184

._crit_edge81:                                    ; preds = %181, %._crit_edge76
  %170 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

171:                                              ; preds = %.lr.ph80, %181
  %.078 = phi i64 [ 1, %.lr.ph80 ], [ %182, %181 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #5
  %172 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %.078)
          to label %173 unwind label %179

173:                                              ; preds = %171
  %174 = extractvalue { ptr, i64 } %172, 0
  store ptr %174, ptr %22, align 8
  %175 = extractvalue { ptr, i64 } %172, 1
  store i64 %175, ptr %158, align 8
  %176 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #5
  br i1 %176, label %177, label %181

177:                                              ; preds = %173
  %178 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.078)
  br label %181

179:                                              ; preds = %171
  %180 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #5
  br label %184

181:                                              ; preds = %173, %177
  %182 = add nuw nsw i64 %.078, 1
  %183 = load i64, ptr %1, align 8, !tbaa !5
  %.not43.not = icmp slt i64 %.078, %183
  br i1 %.not43.not, label %171, label %._crit_edge81, !llvm.loop !19

184:                                              ; preds = %168, %179, %154
  %.pn52.pn = phi { ptr, i32 } [ %.pn52, %154 ], [ %169, %168 ], [ %180, %179 ]
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  br label %185

185:                                              ; preds = %184, %52
  %.pn52.pn.pn = phi { ptr, i32 } [ %.pn52.pn, %184 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn52.pn.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}


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