; LLVM IR from tangjz/acm-icpc :: codeforces/complete (933C)

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

%"struct.std::pair.0" = type { %"struct.std::pair", double }
%"struct.std::pair" = type { double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<double, double>, std::allocator<std::pair<double, double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<double, double>, std::allocator<std::pair<double, double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<double, double>, std::allocator<std::pair<double, double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<double, double>, std::allocator<std::pair<double, double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<double, double>, std::pair<double, double>, std::_Identity<std::pair<double, double>>, std::less<std::pair<double, double>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<double, double>, std::pair<double, double>, std::_Identity<std::pair<double, double>>, std::less<std::pair<double, double>>>::_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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.5" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@dsu = external dso_local global [5001 x i32], align 16
@ans = external dso_local global i32, align 4
@c = external dso_local global [5001 x %"struct.std::pair.0"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::set", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::set", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"struct.std::pair.0", align 8
  %10 = alloca %"struct.std::pair.0", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"struct.std::pair.5", align 8
  %16 = alloca %"struct.std::pair.5", align 8
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %40, %0
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %43

24:                                               ; preds = %19
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @c, i64 0, i64 %26
  %28 = getelementptr inbounds %"struct.std::pair.0", ptr %27, i32 0, i32 0
  %29 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 0
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @c, i64 0, i64 %31
  %33 = getelementptr inbounds %"struct.std::pair.0", ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds %"struct.std::pair", ptr %33, i32 0, i32 1
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @c, i64 0, i64 %36
  %38 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 1
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %29, ptr noundef %34, ptr noundef %38)
  br label %40

40:                                               ; preds = %24
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %2, align 4, !tbaa !5
  br label %19, !llvm.loop !9

43:                                               ; preds = %23
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds %"struct.std::pair.0", ptr @c, i64 %45
  call void @_ZSt4sortIPSt4pairIS0_IddEdEEvT_S4_(ptr noundef @c, ptr noundef %46)
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds %"struct.std::pair.0", ptr @c, i64 %48
  %50 = call noundef ptr @_ZSt6uniqueIPSt4pairIS0_IddEdEET_S4_S4_(ptr noundef @c, ptr noundef %49)
  %51 = ptrtoint ptr %50 to i64
  %52 = sub i64 %51, ptrtoint (ptr @c to i64)
  %53 = sdiv exact i64 %52, 24
  %54 = trunc i64 %53 to i32
  store i32 %54, ptr @n, align 4, !tbaa !5
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = mul i64 %56, 4
  call void @llvm.memset.p0.i64(ptr align 16 @dsu, i8 -1, i64 %57, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #9
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %128, %43
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = load i32, ptr @n, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  br label %131

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #9
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %118, %63
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %122

69:                                               ; preds = %64
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = icmp eq i32 %70, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  br label %118

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #9
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @c, i64 0, i64 %76
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %77, i64 24, i1 false)
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @c, i64 0, i64 %79
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %80, i64 24, i1 false)
  invoke void @_Z7get_insSt4pairIS_IddEdES1_(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %8, ptr noundef byval(%"struct.std::pair.0") align 8 %9, ptr noundef byval(%"struct.std::pair.0") align 8 %10)
          to label %81 unwind label %89

81:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %82 = call ptr @_ZNSt6vectorISt4pairIddESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  br label %84

84:                                               ; preds = %111, %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %85 = call ptr @_ZNSt6vectorISt4pairIddESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIddESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br i1 %87, label %93, label %88

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

89:                                               ; preds = %74
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %11, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %12, align 4
  br label %121

93:                                               ; preds = %84
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !5
  invoke void @_Z9dsu_mergeii(i32 noundef %94, i32 noundef %95)
          to label %96 unwind label %113

96:                                               ; preds = %93
  %97 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIddESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  %98 = invoke { ptr, i8 } @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(16) %97)
          to label %99 unwind label %113

99:                                               ; preds = %96
  %100 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %101 = extractvalue { ptr, i8 } %98, 0
  store ptr %101, ptr %100, align 8
  %102 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %103 = extractvalue { ptr, i8 } %98, 1
  store i8 %103, ptr %102, align 8
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIddESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  %105 = invoke { ptr, i8 } @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(16) %104)
          to label %106 unwind label %113

106:                                              ; preds = %99
  %107 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 0
  %108 = extractvalue { ptr, i8 } %105, 0
  store ptr %108, ptr %107, align 8
  %109 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 1
  %110 = extractvalue { ptr, i8 } %105, 1
  store i8 %110, ptr %109, align 8
  br label %111

111:                                              ; preds = %106
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIddESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %84, !llvm.loop !11

113:                                              ; preds = %99, %96, %93
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %11, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @_ZNSt6vectorISt4pairIddESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  br label %121

117:                                              ; preds = %88
  call void @_ZNSt6vectorISt4pairIddESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #9
  br label %118

118:                                              ; preds = %117, %73
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %7, align 4, !tbaa !5
  br label %64, !llvm.loop !12

121:                                              ; preds = %113, %89
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  br label %168

122:                                              ; preds = %68
  %123 = call noundef i64 @_ZNKSt3setISt4pairIddESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #9
  %124 = load i32, ptr @ans, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = add i64 %125, %123
  %127 = trunc i64 %126 to i32
  store i32 %127, ptr @ans, align 4, !tbaa !5
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #9
  br label %128

128:                                              ; preds = %122
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %4, align 4, !tbaa !5
  br label %58, !llvm.loop !13

131:                                              ; preds = %62
  %132 = call noundef i64 @_ZNKSt3setISt4pairIddESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  %133 = load i32, ptr @ans, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = sub i64 %134, %132
  %136 = trunc i64 %135 to i32
  store i32 %136, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %151, %131
  %138 = load i32, ptr %17, align 4, !tbaa !5
  %139 = load i32, ptr @n, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %158

142:                                              ; preds = %137
  %143 = load i32, ptr %17, align 4, !tbaa !5
  %144 = invoke noundef i32 @_Z8dsu_findi(i32 noundef %143)
          to label %145 unwind label %154

145:                                              ; preds = %142
  %146 = load i32, ptr %17, align 4, !tbaa !5
  %147 = icmp eq i32 %144, %146
  %148 = zext i1 %147 to i32
  %149 = load i32, ptr @ans, align 4, !tbaa !5
  %150 = add nsw i32 %149, %148
  store i32 %150, ptr @ans, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %145
  %152 = load i32, ptr %17, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %17, align 4, !tbaa !5
  br label %137, !llvm.loop !14

154:                                              ; preds = %142
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %11, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %168

158:                                              ; preds = %141
  %159 = load i32, ptr @ans, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr @ans, align 4, !tbaa !5
  %161 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %160)
          to label %162 unwind label %164

162:                                              ; preds = %158
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #9
  %163 = load i32, ptr %1, align 4
  ret i32 %163

164:                                              ; preds = %158
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %11, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %12, align 4
  br label %168

168:                                              ; preds = %164, %154, %121
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #9
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr %11, align 8
  %171 = load i32, ptr %12, align 4
  %172 = insertvalue { ptr, i32 } poison, ptr %170, 0
  %173 = insertvalue { ptr, i32 } %172, i32 %171, 1
  resume { ptr, i32 } %173
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIS0_IddEdEEvT_S4_(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPSt4pairIS0_IddEdEET_S4_S4_(ptr noundef, ptr noundef) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !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}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

%"struct.std::pair.0" = type { %"struct.std::pair", double }
%"struct.std::pair" = type { double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<double, double>, std::allocator<std::pair<double, double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<double, double>, std::allocator<std::pair<double, double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<double, double>, std::allocator<std::pair<double, double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<double, double>, std::allocator<std::pair<double, double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<double, double>, std::pair<double, double>, std::_Identity<std::pair<double, double>>, std::less<std::pair<double, double>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<double, double>, std::pair<double, double>, std::_Identity<std::pair<double, double>>, std::less<std::pair<double, double>>>::_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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@dsu = external dso_local local_unnamed_addr global [5001 x i32], align 16
@ans = external dso_local local_unnamed_addr global i32, align 4
@c = external dso_local global [5001 x %"struct.std::pair.0"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::set", align 8
  %2 = alloca %"class.std::set", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre57 = sext i32 %7 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre57, %.._crit_edge_crit_edge ], [ %26, %.lr.ph ]
  %9 = getelementptr inbounds %"struct.std::pair.0", ptr @c, i64 %.pre-phi
  tail call void @_ZSt4sortIPSt4pairIS0_IddEdEEvT_S4_(ptr noundef nonnull @c, ptr noundef nonnull %9)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds %"struct.std::pair.0", ptr @c, i64 %11
  %13 = tail call noundef ptr @_ZSt6uniqueIPSt4pairIS0_IddEdEET_S4_S4_(ptr noundef nonnull @c, ptr noundef nonnull %12)
  %14 = ptrtoint ptr %13 to i64
  %15 = sub i64 %14, ptrtoint (ptr @c to i64)
  %16 = sdiv exact i64 %15, 24
  %17 = trunc i64 %16 to i32
  store i32 %17, ptr @n, align 4, !tbaa !5
  %sext = shl i64 %16, 32
  %18 = ashr exact i64 %sext, 30
  tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @dsu, i8 -1, i64 %18, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #8
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #8
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph43, label %._crit_edge44

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %21 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @c, i64 0, i64 %indvars.iv
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = getelementptr inbounds i8, ptr %21, i64 16
  %24 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %23)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge44:                                    ; preds = %._crit_edge40, %._crit_edge
  %28 = call noundef i64 @_ZNKSt3setISt4pairIddESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #8
  %29 = load i32, ptr @ans, align 4, !tbaa !5
  %30 = trunc i64 %28 to i32
  %31 = sub i32 %29, %30
  store i32 %31, ptr @ans, align 4, !tbaa !5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph47, label %._crit_edge48

.lr.ph43:                                         ; preds = %._crit_edge, %._crit_edge40
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %._crit_edge40 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #8
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph39, label %._crit_edge40

.lr.ph39:                                         ; preds = %.lr.ph43
  %36 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @c, i64 0, i64 %indvars.iv54
  %37 = trunc nuw nsw i64 %indvars.iv54 to i32
  br label %45

._crit_edge40:                                    ; preds = %69, %.lr.ph43
  %38 = call noundef i64 @_ZNKSt3setISt4pairIddESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  %39 = load i32, ptr @ans, align 4, !tbaa !5
  %40 = trunc i64 %38 to i32
  %41 = add i32 %39, %40
  store i32 %41, ptr @ans, align 4, !tbaa !5
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #8
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next55, %43
  br i1 %44, label %.lr.ph43, label %._crit_edge44, !llvm.loop !11

45:                                               ; preds = %.lr.ph39, %69
  %46 = phi i32 [ %34, %.lr.ph39 ], [ %70, %69 ]
  %indvars.iv51 = phi i64 [ 0, %.lr.ph39 ], [ %indvars.iv.next52, %69 ]
  %47 = icmp eq i64 %indvars.iv54, %indvars.iv51
  br i1 %47, label %69, label %48

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  %49 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @c, i64 0, i64 %indvars.iv51
  invoke void @_Z7get_insSt4pairIS_IddEdES1_(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %3, ptr noundef nonnull byval(%"struct.std::pair.0") align 8 %36, ptr noundef nonnull byval(%"struct.std::pair.0") align 8 %49)
          to label %50 unwind label %55

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %51 = call ptr @_ZNSt6vectorISt4pairIddESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  store ptr %51, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %52 = call ptr @_ZNSt6vectorISt4pairIddESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  store ptr %52, ptr %5, align 8
  %53 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIddESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br i1 %53, label %.lr.ph34.preheader, label %._crit_edge35

.lr.ph34.preheader:                               ; preds = %50
  %54 = trunc nuw nsw i64 %indvars.iv51 to i32
  br label %.lr.ph34

._crit_edge35:                                    ; preds = %63, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @_ZNSt6vectorISt4pairIddESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %69

55:                                               ; preds = %48
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %73

.lr.ph34:                                         ; preds = %.lr.ph34.preheader, %63
  invoke void @_Z9dsu_mergeii(i32 noundef %37, i32 noundef %54)
          to label %57 unwind label %67

57:                                               ; preds = %.lr.ph34
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIddESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %59 = invoke { ptr, i8 } @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %58)
          to label %60 unwind label %67

60:                                               ; preds = %57
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIddESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %62 = invoke { ptr, i8 } @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(16) %61)
          to label %63 unwind label %67

63:                                               ; preds = %60
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIddESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %65 = call ptr @_ZNSt6vectorISt4pairIddESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  store ptr %65, ptr %5, align 8
  %66 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIddESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br i1 %66, label %.lr.ph34, label %._crit_edge35, !llvm.loop !12

67:                                               ; preds = %60, %57, %.lr.ph34
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @_ZNSt6vectorISt4pairIddESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  br label %73

69:                                               ; preds = %45, %._crit_edge35
  %70 = phi i32 [ %46, %45 ], [ %.pre, %._crit_edge35 ]
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next52, %71
  br i1 %72, label %45, label %._crit_edge40, !llvm.loop !13

73:                                               ; preds = %67, %55
  %.pn = phi { ptr, i32 } [ %68, %67 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #8
  br label %88

._crit_edge48:                                    ; preds = %78, %._crit_edge44
  %74 = phi i32 [ %31, %._crit_edge44 ], [ %82, %78 ]
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr @ans, align 4, !tbaa !5
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %75)
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #8
  ret i32 0

.lr.ph47:                                         ; preds = %._crit_edge44, %78
  %.045 = phi i32 [ %83, %78 ], [ 0, %._crit_edge44 ]
  %77 = invoke noundef i32 @_Z8dsu_findi(i32 noundef %.045)
          to label %78 unwind label %86

78:                                               ; preds = %.lr.ph47
  %79 = icmp eq i32 %77, %.045
  %80 = zext i1 %79 to i32
  %81 = load i32, ptr @ans, align 4, !tbaa !5
  %82 = add nsw i32 %81, %80
  store i32 %82, ptr @ans, align 4, !tbaa !5
  %83 = add nuw nsw i32 %.045, 1
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %.lr.ph47, label %._crit_edge48, !llvm.loop !14

86:                                               ; preds = %.lr.ph47
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %88

88:                                               ; preds = %86, %73
  %.pn.pn = phi { ptr, i32 } [ %.pn, %73 ], [ %87, %86 ]
  call void @_ZNSt3setISt4pairIddESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIS0_IddEdEEvT_S4_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPSt4pairIS0_IddEdEET_S4_S4_(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !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}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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