; LLVM IR from DionysiosB/CodeForces :: 0500-0599 (596C-WilburAndPoints)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, std::pair<const long, std::set<std::pair<long, long>>>, std::_Select1st<std::pair<const long, std::set<std::pair<long, long>>>>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, std::pair<const long, std::set<std::pair<long, long>>>, std::_Select1st<std::pair<const long, std::set<std::pair<long, 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.5" = type { i64, i64 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 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 %"class.std::map", align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %"struct.std::pair.5", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca %"class.std::allocator.7", align 1
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 48, ptr %2) #5
  call void @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %22 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
          to label %23 unwind label %29

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

24:                                               ; preds = %53, %23
  %25 = load i64, ptr %6, align 8, !tbaa !5
  %26 = load i64, ptr %3, align 8, !tbaa !5
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %33, label %28

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

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %4, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %5, align 4
  br label %206

33:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %34 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %7, ptr noundef %8)
          to label %35 unwind label %56

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %36 = load i64, ptr %8, align 8, !tbaa !5
  %37 = load i64, ptr %7, align 8, !tbaa !5
  %38 = sub nsw i64 %36, %37
  store i64 %38, ptr %9, align 8, !tbaa !5
  %39 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %40 unwind label %60

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  %41 = invoke { i64, i64 } @_ZSt9make_pairIRlS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %42 unwind label %64

42:                                               ; preds = %40
  %43 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %44 = extractvalue { i64, i64 } %41, 0
  store i64 %44, ptr %43, align 8
  %45 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %46 = extractvalue { i64, i64 } %41, 1
  store i64 %46, ptr %45, align 8
  %47 = invoke { ptr, i8 } @_ZNSt3setISt4pairIllESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %39, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %48 unwind label %64

48:                                               ; preds = %42
  %49 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %50 = extractvalue { ptr, i8 } %47, 0
  store ptr %50, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %52 = extractvalue { ptr, i8 } %47, 1
  store i8 %52, ptr %51, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %53

53:                                               ; preds = %48
  %54 = load i64, ptr %6, align 8, !tbaa !5
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %6, align 8, !tbaa !5
  br label %24, !llvm.loop !9

56:                                               ; preds = %33
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %4, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %5, align 4
  br label %69

60:                                               ; preds = %35
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %4, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %5, align 4
  br label %68

64:                                               ; preds = %42, %40
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %4, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  br label %68

68:                                               ; preds = %64, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %69

69:                                               ; preds = %68, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %206

70:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  %71 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %71, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %72 unwind label %78

72:                                               ; preds = %70
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %120, %72
  %74 = load i64, ptr %14, align 8, !tbaa !5
  %75 = load i64, ptr %3, align 8, !tbaa !5
  %76 = icmp slt i64 %74, %75
  br i1 %76, label %82, label %77

77:                                               ; preds = %73
  store i32 5, ptr %15, align 4
  br label %128

78:                                               ; preds = %70
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %4, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %5, align 4
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  br label %205

82:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %83 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %16)
          to label %84 unwind label %92

84:                                               ; preds = %82
  %85 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %86 unwind label %92

86:                                               ; preds = %84
  %87 = call noundef i64 @_ZNKSt3setISt4pairIllESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %85) #5
  %88 = icmp ne i64 %87, 0
  br i1 %88, label %96, label %89

89:                                               ; preds = %86
  %90 = invoke i32 @puts(ptr noundef @.str.2)
          to label %91 unwind label %92

91:                                               ; preds = %89
  store i32 0, ptr %1, align 4
  store i32 1, ptr %15, align 4
  br label %117

92:                                               ; preds = %109, %107, %105, %89, %84, %82
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %4, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %5, align 4
  br label %127

96:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %97 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %98 unwind label %123

98:                                               ; preds = %96
  %99 = call ptr @_ZNKSt3setISt4pairIllESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %97) #5
  %100 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIllEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %102 = load i64, ptr %14, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %102) #5
  %104 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIllEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %103, ptr noundef nonnull align 8 dereferenceable(16) %101)
          to label %105 unwind label %123

105:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %106 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %107 unwind label %92

107:                                              ; preds = %105
  %108 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %109 unwind label %92

109:                                              ; preds = %107
  %110 = call ptr @_ZNKSt3setISt4pairIllESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %108) #5
  %111 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %110, ptr %111, align 8
  %112 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8
  %114 = invoke ptr @_ZNSt3setISt4pairIllESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %106, ptr %113)
          to label %115 unwind label %92

115:                                              ; preds = %109
  %116 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %114, ptr %116, align 8
  store i32 0, ptr %15, align 4
  br label %117

117:                                              ; preds = %115, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %118 = load i32, ptr %15, align 4
  switch i32 %118, label %128 [
    i32 0, label %119
  ]

119:                                              ; preds = %117
  br label %120

120:                                              ; preds = %119
  %121 = load i64, ptr %14, align 8, !tbaa !5
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %14, align 8, !tbaa !5
  br label %73, !llvm.loop !11

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

127:                                              ; preds = %123, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %204

128:                                              ; preds = %117, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %129 = load i32, ptr %15, align 4
  switch i32 %129, label %202 [
    i32 5, label %130
  ]

130:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 1, ptr %20, align 8, !tbaa !5
  br label %131

131:                                              ; preds = %166, %130
  %132 = load i64, ptr %20, align 8, !tbaa !5
  %133 = load i64, ptr %3, align 8, !tbaa !5
  %134 = icmp slt i64 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  store i32 8, ptr %15, align 4
  br label %169

136:                                              ; preds = %131
  %137 = load i64, ptr %20, align 8, !tbaa !5
  %138 = sub nsw i64 %137, 1
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %138) #5
  %140 = getelementptr inbounds %"struct.std::pair.5", ptr %139, i32 0, i32 0
  %141 = load i64, ptr %140, align 8, !tbaa !12
  %142 = load i64, ptr %20, align 8, !tbaa !5
  %143 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %142) #5
  %144 = getelementptr inbounds %"struct.std::pair.5", ptr %143, i32 0, i32 0
  %145 = load i64, ptr %144, align 8, !tbaa !12
  %146 = icmp sge i64 %141, %145
  br i1 %146, label %147, label %165

147:                                              ; preds = %136
  %148 = load i64, ptr %20, align 8, !tbaa !5
  %149 = sub nsw i64 %148, 1
  %150 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %149) #5
  %151 = getelementptr inbounds %"struct.std::pair.5", ptr %150, i32 0, i32 1
  %152 = load i64, ptr %151, align 8, !tbaa !14
  %153 = load i64, ptr %20, align 8, !tbaa !5
  %154 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %153) #5
  %155 = getelementptr inbounds %"struct.std::pair.5", ptr %154, i32 0, i32 1
  %156 = load i64, ptr %155, align 8, !tbaa !14
  %157 = icmp sge i64 %152, %156
  br i1 %157, label %158, label %165

158:                                              ; preds = %147
  %159 = invoke i32 @puts(ptr noundef @.str.2)
          to label %160 unwind label %161

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

161:                                              ; preds = %158
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %4, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %204

165:                                              ; preds = %147, %136
  br label %166

166:                                              ; preds = %165
  %167 = load i64, ptr %20, align 8, !tbaa !5
  %168 = add nsw i64 %167, 1
  store i64 %168, ptr %20, align 8, !tbaa !5
  br label %131, !llvm.loop !15

169:                                              ; preds = %160, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %170 = load i32, ptr %15, align 4
  switch i32 %170, label %202 [
    i32 8, label %171
  ]

171:                                              ; preds = %169
  %172 = invoke i32 @puts(ptr noundef @.str.3)
          to label %173 unwind label %179

173:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 0, ptr %21, align 8, !tbaa !5
  br label %174

174:                                              ; preds = %194, %173
  %175 = load i64, ptr %21, align 8, !tbaa !5
  %176 = load i64, ptr %3, align 8, !tbaa !5
  %177 = icmp slt i64 %175, %176
  br i1 %177, label %183, label %178

178:                                              ; preds = %174
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %201

179:                                              ; preds = %171
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %4, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %5, align 4
  br label %204

183:                                              ; preds = %174
  %184 = load i64, ptr %21, align 8, !tbaa !5
  %185 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %184) #5
  %186 = getelementptr inbounds %"struct.std::pair.5", ptr %185, i32 0, i32 0
  %187 = load i64, ptr %186, align 8, !tbaa !12
  %188 = load i64, ptr %21, align 8, !tbaa !5
  %189 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %188) #5
  %190 = getelementptr inbounds %"struct.std::pair.5", ptr %189, i32 0, i32 1
  %191 = load i64, ptr %190, align 8, !tbaa !14
  %192 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %187, i64 noundef %191)
          to label %193 unwind label %197

193:                                              ; preds = %183
  br label %194

194:                                              ; preds = %193
  %195 = load i64, ptr %21, align 8, !tbaa !5
  %196 = add nsw i64 %195, 1
  store i64 %196, ptr %21, align 8, !tbaa !5
  br label %174, !llvm.loop !16

197:                                              ; preds = %183
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %4, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %204

201:                                              ; preds = %178
  store i32 0, ptr %1, align 4
  store i32 1, ptr %15, align 4
  br label %202

202:                                              ; preds = %201, %169, %128
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #5
  %203 = load i32, ptr %1, align 4
  ret i32 %203

204:                                              ; preds = %197, %179, %161, %127
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br label %205

205:                                              ; preds = %204, %78
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %206

206:                                              ; preds = %205, %69, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #5
  br label %207

207:                                              ; preds = %206
  %208 = load ptr, ptr %4, align 8
  %209 = load i32, ptr %5, align 4
  %210 = insertvalue { ptr, i32 } poison, ptr %208, 0
  %211 = insertvalue { ptr, i32 } %210, i32 %209, 1
  resume { ptr, i32 } %211
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixEOl(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 } @_ZNSt3setISt4pairIllESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

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

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

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

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

declare i32 @puts(ptr noundef) #3

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { 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 = { "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 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!14 = !{!13, !6, i64 8}
!15 = distinct !{!15, !10}
!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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, std::pair<const long, std::set<std::pair<long, long>>>, std::_Select1st<std::pair<const long, std::set<std::pair<long, long>>>>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, std::pair<const long, std::set<std::pair<long, long>>>, std::_Select1st<std::pair<const long, std::set<std::pair<long, 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.5" = type { i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 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 %"class.std::map", align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::pair.5", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator.7", align 1
  %9 = alloca i64, align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #5
  call void @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = icmp sgt i64 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %14 = getelementptr inbounds i8, ptr %6, i64 8
  br label %15

._crit_edge:                                      ; preds = %27, %0
  %.lcssa = phi i64 [ %12, %0 ], [ %29, %27 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.lcssa, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %36 unwind label %39

15:                                               ; preds = %.lr.ph, %27
  %.03851 = phi i64 [ 0, %.lr.ph ], [ %28, %27 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %17 = load i64, ptr %4, align 8, !tbaa !5
  %18 = load i64, ptr %3, align 8, !tbaa !5
  %19 = sub nsw i64 %17, %18
  store i64 %19, ptr %5, align 8, !tbaa !5
  %20 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %21 unwind label %31

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %22 = invoke { i64, i64 } @_ZSt9make_pairIRlS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %23 unwind label %33

23:                                               ; preds = %21
  %24 = extractvalue { i64, i64 } %22, 0
  store i64 %24, ptr %6, align 8
  %25 = extractvalue { i64, i64 } %22, 1
  store i64 %25, ptr %14, align 8
  %26 = invoke { ptr, i8 } @_ZNSt3setISt4pairIllESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %20, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %27 unwind label %33

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %28 = add nuw nsw i64 %.03851, 1
  %29 = load i64, ptr %2, align 8, !tbaa !5
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %15, label %._crit_edge, !llvm.loop !9

31:                                               ; preds = %15
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %35

33:                                               ; preds = %23, %21
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %35

35:                                               ; preds = %33, %31
  %.pn44 = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %97

36:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  %37 = load i64, ptr %2, align 8, !tbaa !5
  %.not52 = icmp sgt i64 %37, 0
  br i1 %.not52, label %.lr.ph55, label %.critedge48

.critedge.preheader:                              ; preds = %60
  %38 = icmp sgt i64 %62, 1
  br i1 %38, label %.lr.ph58, label %.critedge48

39:                                               ; preds = %._crit_edge
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  br label %96

.lr.ph55:                                         ; preds = %36, %60
  %.03353 = phi i64 [ %61, %60 ], [ 0, %36 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %9)
  %42 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %43 unwind label %45

43:                                               ; preds = %.lr.ph55
  %44 = call noundef i64 @_ZNKSt3setISt4pairIllESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %42) #5
  %.not.not = icmp eq i64 %44, 0
  br i1 %.not.not, label %66, label %47

45:                                               ; preds = %57, %55, %49, %.lr.ph55
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %65

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %48 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %49 unwind label %63

49:                                               ; preds = %47
  %50 = call ptr @_ZNKSt3setISt4pairIllESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %48) #5
  store ptr %50, ptr %10, align 8
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIllEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.03353) #5
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIllEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 8 dereferenceable(16) %51)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %54 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %55 unwind label %45

55:                                               ; preds = %49
  %56 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %57 unwind label %45

57:                                               ; preds = %55
  %58 = call ptr @_ZNKSt3setISt4pairIllESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %56) #5
  %59 = invoke ptr @_ZNSt3setISt4pairIllESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %54, ptr %58)
          to label %60 unwind label %45

60:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  %61 = add nuw nsw i64 %.03353, 1
  %62 = load i64, ptr %2, align 8, !tbaa !5
  %.not = icmp slt i64 %61, %62
  br i1 %.not, label %.lr.ph55, label %.critedge.preheader, !llvm.loop !11

63:                                               ; preds = %47
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %65

65:                                               ; preds = %63, %45
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %96

66:                                               ; preds = %43
  %67 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %.loopexit

.lr.ph58:                                         ; preds = %.critedge.preheader, %.critedge
  %.02457 = phi i64 [ %82, %.critedge ], [ 1, %.critedge.preheader ]
  %68 = add nsw i64 %.02457, -1
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %68) #5
  %70 = load i64, ptr %69, align 8, !tbaa !12
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.02457) #5
  %72 = load i64, ptr %71, align 8, !tbaa !12
  %.not41 = icmp slt i64 %70, %72
  br i1 %.not41, label %.critedge, label %73

73:                                               ; preds = %.lr.ph58
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %68) #5
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  %76 = load i64, ptr %75, align 8, !tbaa !14
  %77 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.02457) #5
  %78 = getelementptr inbounds i8, ptr %77, i64 8
  %79 = load i64, ptr %78, align 8, !tbaa !14
  %.not42 = icmp slt i64 %76, %79
  br i1 %.not42, label %.critedge, label %80

80:                                               ; preds = %73
  %81 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.loopexit

.critedge:                                        ; preds = %.lr.ph58, %73
  %82 = add nuw nsw i64 %.02457, 1
  %83 = load i64, ptr %2, align 8, !tbaa !5
  %.not43 = icmp slt i64 %82, %83
  br i1 %.not43, label %.lr.ph58, label %.critedge48, !llvm.loop !15

.critedge48:                                      ; preds = %.critedge, %36, %.critedge.preheader
  %84 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %85 = load i64, ptr %2, align 8, !tbaa !5
  %86 = icmp sgt i64 %85, 0
  br i1 %86, label %.lr.ph60, label %.loopexit

.lr.ph60:                                         ; preds = %.critedge48, %.lr.ph60
  %.059 = phi i64 [ %93, %.lr.ph60 ], [ 0, %.critedge48 ]
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.059) #5
  %88 = load i64, ptr %87, align 8, !tbaa !12
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.059) #5
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  %91 = load i64, ptr %90, align 8, !tbaa !14
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %88, i64 noundef %91)
  %93 = add nuw nsw i64 %.059, 1
  %94 = load i64, ptr %2, align 8, !tbaa !5
  %95 = icmp slt i64 %93, %94
  br i1 %95, label %.lr.ph60, label %.loopexit, !llvm.loop !16

.loopexit:                                        ; preds = %.lr.ph60, %.critedge48, %80, %66
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #5
  ret i32 0

96:                                               ; preds = %65, %39
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %97

97:                                               ; preds = %96, %35
  %.pn44.pn = phi { ptr, i32 } [ %.pn44, %35 ], [ %.pn.pn, %96 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn44.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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIlSt3setISt4pairIllESt4lessIS2_ESaIS2_EES3_IlESaIS1_IKlS6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { 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 = { 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 #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 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!14 = !{!13, !6, i64 8}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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