; LLVM IR from DionysiosB/CodeForces :: 0400-0499 (468B-TwoSets)

; 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<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = 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::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 [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 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 i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::set", align 8
  %10 = alloca %"class.std::set", align 8
  %11 = alloca %"class.std::set", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i8, align 1
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca i64, align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca i64, align 8
  %25 = alloca %"struct.std::pair", align 8
  %26 = alloca i64, align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca %"struct.std::pair", align 8
  %29 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %31 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %32 unwind label %38

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

33:                                               ; preds = %55, %32
  %34 = load i64, ptr %12, align 8, !tbaa !5
  %35 = load i64, ptr %2, align 8, !tbaa !5
  %36 = icmp slt i64 %34, %35
  br i1 %36, label %42, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %62

38:                                               ; preds = %0
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %269

42:                                               ; preds = %33
  %43 = load i64, ptr %12, align 8, !tbaa !5
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %43) #5
  %45 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %44)
          to label %46 unwind label %58

46:                                               ; preds = %42
  %47 = load i64, ptr %12, align 8, !tbaa !5
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %47) #5
  %49 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %48)
          to label %50 unwind label %58

50:                                               ; preds = %46
  %51 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 0
  %52 = extractvalue { ptr, i8 } %49, 0
  store ptr %52, ptr %51, align 8
  %53 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 1
  %54 = extractvalue { ptr, i8 } %49, 1
  store i8 %54, ptr %53, align 8
  br label %55

55:                                               ; preds = %50
  %56 = load i64, ptr %12, align 8, !tbaa !5
  %57 = add nsw i64 %56, 1
  store i64 %57, ptr %12, align 8, !tbaa !5
  br label %33, !llvm.loop !9

58:                                               ; preds = %46, %42
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %268

62:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  store i8 1, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %222, %62
  %64 = load i64, ptr %15, align 8, !tbaa !5
  %65 = load i64, ptr %2, align 8, !tbaa !5
  %66 = icmp slt i64 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 5, ptr %16, align 4
  br label %225

68:                                               ; preds = %63
  %69 = load i64, ptr %15, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %69) #5
  %71 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %70)
          to label %72 unwind label %75

72:                                               ; preds = %68
  %73 = icmp ule i64 %71, 0
  br i1 %73, label %74, label %79

74:                                               ; preds = %72
  br label %222

75:                                               ; preds = %208, %189, %140, %92, %79, %68
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %7, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %8, align 4
  br label %226

79:                                               ; preds = %72
  %80 = load i64, ptr %15, align 8, !tbaa !5
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %80) #5
  %82 = invoke noundef i64 @_ZNSt3setIlSt4lessIlESaIlEE5eraseERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %81)
          to label %83 unwind label %75

83:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %84 = load i64, ptr %3, align 8, !tbaa !5
  %85 = load i64, ptr %15, align 8, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %85) #5
  %87 = load i64, ptr %86, align 8, !tbaa !5
  %88 = sub nsw i64 %84, %87
  store i64 %88, ptr %17, align 8, !tbaa !5
  %89 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %90 unwind label %119

90:                                               ; preds = %83
  %91 = icmp ne i64 %89, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br i1 %91, label %92, label %131

92:                                               ; preds = %90
  %93 = load i64, ptr %15, align 8, !tbaa !5
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %93) #5
  %95 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %94)
          to label %96 unwind label %75

96:                                               ; preds = %92
  %97 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %98 = extractvalue { ptr, i8 } %95, 0
  store ptr %98, ptr %97, align 8
  %99 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %100 = extractvalue { ptr, i8 } %95, 1
  store i8 %100, ptr %99, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %101 = load i64, ptr %3, align 8, !tbaa !5
  %102 = load i64, ptr %15, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %102) #5
  %104 = load i64, ptr %103, align 8, !tbaa !5
  %105 = sub nsw i64 %101, %104
  store i64 %105, ptr %19, align 8, !tbaa !5
  %106 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertEOl(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %107 unwind label %123

107:                                              ; preds = %96
  %108 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 0
  %109 = extractvalue { ptr, i8 } %106, 0
  store ptr %109, ptr %108, align 8
  %110 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 1
  %111 = extractvalue { ptr, i8 } %106, 1
  store i8 %111, ptr %110, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %112 = load i64, ptr %3, align 8, !tbaa !5
  %113 = load i64, ptr %15, align 8, !tbaa !5
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %113) #5
  %115 = load i64, ptr %114, align 8, !tbaa !5
  %116 = sub nsw i64 %112, %115
  store i64 %116, ptr %21, align 8, !tbaa !5
  %117 = invoke noundef i64 @_ZNSt3setIlSt4lessIlESaIlEE5eraseERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %118 unwind label %127

118:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %221

119:                                              ; preds = %83
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %7, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %226

123:                                              ; preds = %96
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %7, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %226

127:                                              ; preds = %107
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %7, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %226

131:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %132 = load i64, ptr %4, align 8, !tbaa !5
  %133 = load i64, ptr %15, align 8, !tbaa !5
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %133) #5
  %135 = load i64, ptr %134, align 8, !tbaa !5
  %136 = sub nsw i64 %132, %135
  store i64 %136, ptr %22, align 8, !tbaa !5
  %137 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %138 unwind label %167

138:                                              ; preds = %131
  %139 = icmp ne i64 %137, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br i1 %139, label %140, label %179

140:                                              ; preds = %138
  %141 = load i64, ptr %15, align 8, !tbaa !5
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %141) #5
  %143 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %142)
          to label %144 unwind label %75

144:                                              ; preds = %140
  %145 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 0
  %146 = extractvalue { ptr, i8 } %143, 0
  store ptr %146, ptr %145, align 8
  %147 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 1
  %148 = extractvalue { ptr, i8 } %143, 1
  store i8 %148, ptr %147, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %149 = load i64, ptr %4, align 8, !tbaa !5
  %150 = load i64, ptr %15, align 8, !tbaa !5
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %150) #5
  %152 = load i64, ptr %151, align 8, !tbaa !5
  %153 = sub nsw i64 %149, %152
  store i64 %153, ptr %24, align 8, !tbaa !5
  %154 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertEOl(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %155 unwind label %171

155:                                              ; preds = %144
  %156 = getelementptr inbounds { ptr, i8 }, ptr %25, i32 0, i32 0
  %157 = extractvalue { ptr, i8 } %154, 0
  store ptr %157, ptr %156, align 8
  %158 = getelementptr inbounds { ptr, i8 }, ptr %25, i32 0, i32 1
  %159 = extractvalue { ptr, i8 } %154, 1
  store i8 %159, ptr %158, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %160 = load i64, ptr %4, align 8, !tbaa !5
  %161 = load i64, ptr %15, align 8, !tbaa !5
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %161) #5
  %163 = load i64, ptr %162, align 8, !tbaa !5
  %164 = sub nsw i64 %160, %163
  store i64 %164, ptr %26, align 8, !tbaa !5
  %165 = invoke noundef i64 @_ZNSt3setIlSt4lessIlESaIlEE5eraseERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %166 unwind label %175

166:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %220

167:                                              ; preds = %131
  %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 %22) #5
  br label %226

171:                                              ; preds = %144
  %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 8, ptr %24) #5
  br label %226

175:                                              ; preds = %155
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %7, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %226

179:                                              ; preds = %138
  %180 = load i64, ptr %15, align 8, !tbaa !5
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %180) #5
  %182 = load i64, ptr %181, align 8, !tbaa !5
  %183 = load i64, ptr %3, align 8, !tbaa !5
  %184 = load i64, ptr %15, align 8, !tbaa !5
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %184) #5
  %186 = load i64, ptr %185, align 8, !tbaa !5
  %187 = sub nsw i64 %183, %186
  %188 = icmp eq i64 %182, %187
  br i1 %188, label %189, label %198

189:                                              ; preds = %179
  %190 = load i64, ptr %15, align 8, !tbaa !5
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %190) #5
  %192 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %191)
          to label %193 unwind label %75

193:                                              ; preds = %189
  %194 = getelementptr inbounds { ptr, i8 }, ptr %27, i32 0, i32 0
  %195 = extractvalue { ptr, i8 } %192, 0
  store ptr %195, ptr %194, align 8
  %196 = getelementptr inbounds { ptr, i8 }, ptr %27, i32 0, i32 1
  %197 = extractvalue { ptr, i8 } %192, 1
  store i8 %197, ptr %196, align 8
  br label %219

198:                                              ; preds = %179
  %199 = load i64, ptr %15, align 8, !tbaa !5
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %199) #5
  %201 = load i64, ptr %200, align 8, !tbaa !5
  %202 = load i64, ptr %4, align 8, !tbaa !5
  %203 = load i64, ptr %15, align 8, !tbaa !5
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %203) #5
  %205 = load i64, ptr %204, align 8, !tbaa !5
  %206 = sub nsw i64 %202, %205
  %207 = icmp eq i64 %201, %206
  br i1 %207, label %208, label %217

208:                                              ; preds = %198
  %209 = load i64, ptr %15, align 8, !tbaa !5
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %209) #5
  %211 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %210)
          to label %212 unwind label %75

212:                                              ; preds = %208
  %213 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 0
  %214 = extractvalue { ptr, i8 } %211, 0
  store ptr %214, ptr %213, align 8
  %215 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 1
  %216 = extractvalue { ptr, i8 } %211, 1
  store i8 %216, ptr %215, align 8
  br label %218

217:                                              ; preds = %198
  store i8 0, ptr %14, align 1, !tbaa !11
  store i32 5, ptr %16, align 4
  br label %225

218:                                              ; preds = %212
  br label %219

219:                                              ; preds = %218, %193
  br label %220

220:                                              ; preds = %219, %166
  br label %221

221:                                              ; preds = %220, %118
  br label %222

222:                                              ; preds = %221, %74
  %223 = load i64, ptr %15, align 8, !tbaa !5
  %224 = add nsw i64 %223, 1
  store i64 %224, ptr %15, align 8, !tbaa !5
  br label %63, !llvm.loop !13

225:                                              ; preds = %217, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %227

226:                                              ; preds = %175, %171, %167, %127, %123, %119, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %267

227:                                              ; preds = %225
  %228 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %229 = trunc i8 %228 to i1
  br i1 %229, label %230, label %262

230:                                              ; preds = %227
  %231 = invoke i32 @puts(ptr noundef @.str.2)
          to label %232 unwind label %238

232:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  store i64 0, ptr %29, align 8, !tbaa !5
  br label %233

233:                                              ; preds = %252, %232
  %234 = load i64, ptr %29, align 8, !tbaa !5
  %235 = load i64, ptr %2, align 8, !tbaa !5
  %236 = icmp slt i64 %234, %235
  br i1 %236, label %242, label %237

237:                                              ; preds = %233
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %259

238:                                              ; preds = %262, %259, %230
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %7, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %8, align 4
  br label %267

242:                                              ; preds = %233
  %243 = load i64, ptr %29, align 8, !tbaa !5
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %243) #5
  %245 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %244)
          to label %246 unwind label %255

246:                                              ; preds = %242
  %247 = icmp ne i64 %245, 0
  %248 = zext i1 %247 to i64
  %249 = select i1 %247, i32 0, i32 1
  %250 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %249)
          to label %251 unwind label %255

251:                                              ; preds = %246
  br label %252

252:                                              ; preds = %251
  %253 = load i64, ptr %29, align 8, !tbaa !5
  %254 = add nsw i64 %253, 1
  store i64 %254, ptr %29, align 8, !tbaa !5
  br label %233, !llvm.loop !16

255:                                              ; preds = %246, %242
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %7, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %267

259:                                              ; preds = %237
  %260 = invoke i32 @puts(ptr noundef @.str.4)
          to label %261 unwind label %238

261:                                              ; preds = %259
  br label %265

262:                                              ; preds = %227
  %263 = invoke i32 @puts(ptr noundef @.str.5)
          to label %264 unwind label %238

264:                                              ; preds = %262
  br label %265

265:                                              ; preds = %264, %261
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %266 = load i32, ptr %1, align 4
  ret i32 %266

267:                                              ; preds = %255, %238, %226
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %268

268:                                              ; preds = %267, %58
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %269

269:                                              ; preds = %268, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %270

270:                                              ; preds = %269
  %271 = load ptr, ptr %7, align 8
  %272 = load i32, ptr %8, align 4
  %273 = insertvalue { ptr, i32 } poison, ptr %271, 0
  %274 = insertvalue { ptr, i32 } %273, i32 %272, 1
  resume { ptr, i32 } %274
}

; 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 @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare i32 @puts(ptr noundef) #2

declare i32 @printf(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 @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !10}


; 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<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = 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 }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 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 i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::set", align 8
  %7 = alloca %"class.std::set", align 8
  %8 = alloca %"class.std::set", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  %16 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %16, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %17 unwind label %21

17:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(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.start.p0(i64 48, ptr nonnull %6) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  %18 = load i64, ptr %1, align 8, !tbaa !5
  %19 = icmp sgt i64 %18, 0
  br i1 %19, label %.lr.ph, label %.critedge

.preheader:                                       ; preds = %27
  %20 = icmp sgt i64 %29, 0
  br i1 %20, label %.lr.ph59, label %.critedge

21:                                               ; preds = %0
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %138

.lr.ph:                                           ; preds = %17, %27
  %.04556 = phi i64 [ %28, %27 ], [ 0, %17 ]
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04556) #5
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %23)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04556) #5
  %26 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %27 unwind label %31

27:                                               ; preds = %.lr.ph
  %28 = add nuw nsw i64 %.04556, 1
  %29 = load i64, ptr %1, align 8, !tbaa !5
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %.lr.ph, label %.preheader, !llvm.loop !9

31:                                               ; preds = %.lr.ph
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %137

.lr.ph59:                                         ; preds = %.preheader, %120
  %.04758 = phi i64 [ %121, %120 ], [ 0, %.preheader ]
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %34 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %35 unwind label %37

35:                                               ; preds = %.lr.ph59
  %36 = icmp eq i64 %34, 0
  br i1 %36, label %120, label %39

37:                                               ; preds = %.invoke, %79, %49, %39, %.lr.ph59
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %137

39:                                               ; preds = %35
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %41 = invoke noundef i64 @_ZNSt3setIlSt4lessIlESaIlEE5eraseERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %42 unwind label %37

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %43 = load i64, ptr %2, align 8, !tbaa !5
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = sub nsw i64 %43, %45
  store i64 %46, ptr %9, align 8, !tbaa !5
  %47 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %48 unwind label %65

48:                                               ; preds = %42
  %.not = icmp eq i64 %47, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br i1 %.not, label %71, label %49

49:                                               ; preds = %48
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %51 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(8) %50)
          to label %52 unwind label %37

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %53 = load i64, ptr %2, align 8, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %56 = sub nsw i64 %53, %55
  store i64 %56, ptr %10, align 8, !tbaa !5
  %57 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertEOl(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %58 unwind label %67

58:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %59 = load i64, ptr %2, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = sub nsw i64 %59, %61
  store i64 %62, ptr %11, align 8, !tbaa !5
  %63 = invoke noundef i64 @_ZNSt3setIlSt4lessIlESaIlEE5eraseERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %64 unwind label %69

64:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %120

65:                                               ; preds = %42
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %137

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

69:                                               ; preds = %58
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %137

71:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %72 = load i64, ptr %3, align 8, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %74 = load i64, ptr %73, align 8, !tbaa !5
  %75 = sub nsw i64 %72, %74
  store i64 %75, ptr %12, align 8, !tbaa !5
  %76 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %77 unwind label %94

77:                                               ; preds = %71
  %.not48 = icmp eq i64 %76, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  br i1 %.not48, label %100, label %79

79:                                               ; preds = %77
  %80 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %78)
          to label %81 unwind label %37

81:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %82 = load i64, ptr %3, align 8, !tbaa !5
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %84 = load i64, ptr %83, align 8, !tbaa !5
  %85 = sub nsw i64 %82, %84
  store i64 %85, ptr %13, align 8, !tbaa !5
  %86 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertEOl(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %87 unwind label %96

87:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %88 = load i64, ptr %3, align 8, !tbaa !5
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %90 = load i64, ptr %89, align 8, !tbaa !5
  %91 = sub nsw i64 %88, %90
  store i64 %91, ptr %14, align 8, !tbaa !5
  %92 = invoke noundef i64 @_ZNSt3setIlSt4lessIlESaIlEE5eraseERKl(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %93 unwind label %98

93:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  br label %120

94:                                               ; preds = %71
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %137

96:                                               ; preds = %81
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %137

98:                                               ; preds = %87
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  br label %137

100:                                              ; preds = %77
  %101 = load i64, ptr %78, align 8, !tbaa !5
  %102 = load i64, ptr %2, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %104 = load i64, ptr %103, align 8, !tbaa !5
  %105 = sub nsw i64 %102, %104
  %106 = icmp eq i64 %101, %105
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  br i1 %106, label %.invoke, label %108

108:                                              ; preds = %100
  %109 = load i64, ptr %107, align 8, !tbaa !5
  %110 = load i64, ptr %3, align 8, !tbaa !5
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  %112 = load i64, ptr %111, align 8, !tbaa !5
  %113 = sub nsw i64 %110, %112
  %114 = icmp eq i64 %109, %113
  br i1 %114, label %115, label %._crit_edge

115:                                              ; preds = %108
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04758) #5
  br label %.invoke

.invoke:                                          ; preds = %100, %115
  %117 = phi ptr [ %8, %115 ], [ %7, %100 ]
  %118 = phi ptr [ %116, %115 ], [ %107, %100 ]
  %119 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %117, ptr noundef nonnull align 8 dereferenceable(8) %118)
          to label %120 unwind label %37

120:                                              ; preds = %.invoke, %64, %93, %35
  %121 = add nuw nsw i64 %.04758, 1
  %122 = load i64, ptr %1, align 8, !tbaa !5
  %.not49 = icmp slt i64 %121, %122
  br i1 %.not49, label %.lr.ph59, label %.critedge, !llvm.loop !11

.critedge:                                        ; preds = %120, %17, %.preheader
  %123 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  %124 = load i64, ptr %1, align 8, !tbaa !5
  %125 = icmp sgt i64 %124, 0
  br i1 %125, label %.lr.ph61, label %._crit_edge

.lr.ph61:                                         ; preds = %.critedge, %128
  %.060 = phi i64 [ %131, %128 ], [ 0, %.critedge ]
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.060) #5
  %127 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(8) %126)
          to label %128 unwind label %134

128:                                              ; preds = %.lr.ph61
  %.not50 = icmp eq i64 %127, 0
  %129 = zext i1 %.not50 to i32
  %130 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %129)
  %131 = add nuw nsw i64 %.060, 1
  %132 = load i64, ptr %1, align 8, !tbaa !5
  %133 = icmp slt i64 %131, %132
  br i1 %133, label %.lr.ph61, label %._crit_edge, !llvm.loop !12

134:                                              ; preds = %.lr.ph61
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %137

._crit_edge:                                      ; preds = %108, %128, %.critedge
  %.str.5.sink = phi ptr [ @.str.4, %.critedge ], [ @.str.4, %128 ], [ @.str.5, %108 ]
  %136 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.5.sink)
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  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 @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, 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

137:                                              ; preds = %134, %98, %96, %94, %69, %67, %65, %37, %31
  %.pn53 = phi { ptr, i32 } [ %32, %31 ], [ %135, %134 ], [ %70, %69 ], [ %68, %67 ], [ %38, %37 ], [ %99, %98 ], [ %97, %96 ], [ %95, %94 ], [ %66, %65 ]
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  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 @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %138

138:                                              ; preds = %137, %21
  %.pn53.pn = phi { ptr, i32 } [ %.pn53, %137 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 } %.pn53.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 @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(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 @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


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