; LLVM IR from DionysiosB/CodeForces :: 0700-0799 (799C-Fountains)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<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 }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

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

35:                                               ; preds = %80, %0
  %36 = load i64, ptr %7, align 8, !tbaa !5
  %37 = load i64, ptr %2, align 8, !tbaa !5
  %38 = icmp slt i64 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %84

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  %41 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %8, ptr noundef %9, ptr noundef %10)
          to label %42 unwind label %54

42:                                               ; preds = %40
  %43 = load i8, ptr %10, align 1, !tbaa !9
  %44 = sext i8 %43 to i32
  %45 = icmp eq i32 %44, 67
  br i1 %45, label %46, label %62

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  %47 = invoke { i64, i64 } @_ZSt9make_pairIRlS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %48 unwind label %58

48:                                               ; preds = %46
  %49 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %50 = extractvalue { i64, i64 } %47, 0
  store i64 %50, ptr %49, align 8
  %51 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %52 = extractvalue { i64, i64 } %47, 1
  store i64 %52, ptr %51, align 8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %53 unwind label %58

53:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  br label %79

54:                                               ; preds = %40
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %11, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %12, align 4
  br label %83

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

62:                                               ; preds = %42
  %63 = load i8, ptr %10, align 1, !tbaa !9
  %64 = sext i8 %63 to i32
  %65 = icmp eq i32 %64, 68
  br i1 %65, label %66, label %78

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %67 = invoke { i64, i64 } @_ZSt9make_pairIRlS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %68 unwind label %74

68:                                               ; preds = %66
  %69 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %70 = extractvalue { i64, i64 } %67, 0
  store i64 %70, ptr %69, align 8
  %71 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %72 = extractvalue { i64, i64 } %67, 1
  store i64 %72, ptr %71, align 8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %73 unwind label %74

73:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  br label %78

74:                                               ; preds = %68, %66
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %11, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  br label %83

78:                                               ; preds = %73, %62
  br label %79

79:                                               ; preds = %78, %53
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %80

80:                                               ; preds = %79
  %81 = load i64, ptr %7, align 8, !tbaa !5
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %7, align 8, !tbaa !5
  br label %35, !llvm.loop !10

83:                                               ; preds = %74, %58, %54
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %361

84:                                               ; preds = %39
  %85 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %90, ptr %92)
          to label %93 unwind label %108

93:                                               ; preds = %84
  %94 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  %96 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %96, ptr %97, align 8
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %99, ptr %101)
          to label %102 unwind label %108

102:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  %103 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %104 = icmp ugt i64 %103, 0
  br i1 %104, label %105, label %116

105:                                              ; preds = %102
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #7
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(16) %106)
          to label %107 unwind label %112

107:                                              ; preds = %105
  br label %116

108:                                              ; preds = %93, %84
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %11, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %12, align 4
  br label %361

112:                                              ; preds = %119, %105
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %11, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %12, align 4
  br label %360

116:                                              ; preds = %107, %102
  %117 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %118 = icmp ugt i64 %117, 0
  br i1 %118, label %119, label %122

119:                                              ; preds = %116
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #7
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(16) %120)
          to label %121 unwind label %112

121:                                              ; preds = %119
  br label %122

122:                                              ; preds = %121, %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 1, ptr %21, align 8, !tbaa !5
  br label %123

123:                                              ; preds = %156, %122
  %124 = load i64, ptr %21, align 8, !tbaa !5
  %125 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %126 = icmp ult i64 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %159

128:                                              ; preds = %123
  %129 = load i64, ptr %21, align 8, !tbaa !5
  %130 = sub nsw i64 %129, 1
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %130) #7
  %132 = load i64, ptr %21, align 8, !tbaa !5
  %133 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %132) #7
  %134 = invoke noundef zeroext i1 @_ZSteqIllEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %131, ptr noundef nonnull align 8 dereferenceable(16) %133)
          to label %135 unwind label %151

135:                                              ; preds = %128
  br i1 %134, label %147, label %136

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

147:                                              ; preds = %136, %135
  %148 = load i64, ptr %21, align 8, !tbaa !5
  %149 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %148) #7
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(16) %149)
          to label %150 unwind label %151

150:                                              ; preds = %147
  br label %155

151:                                              ; preds = %147, %128
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %11, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %360

155:                                              ; preds = %150, %136
  br label %156

156:                                              ; preds = %155
  %157 = load i64, ptr %21, align 8, !tbaa !5
  %158 = add nsw i64 %157, 1
  store i64 %158, ptr %21, align 8, !tbaa !5
  br label %123, !llvm.loop !14

159:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 1, ptr %22, align 8, !tbaa !5
  br label %160

160:                                              ; preds = %193, %159
  %161 = load i64, ptr %22, align 8, !tbaa !5
  %162 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %163 = icmp ult i64 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %196

165:                                              ; preds = %160
  %166 = load i64, ptr %22, align 8, !tbaa !5
  %167 = sub nsw i64 %166, 1
  %168 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %167) #7
  %169 = load i64, ptr %22, align 8, !tbaa !5
  %170 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %169) #7
  %171 = invoke noundef zeroext i1 @_ZSteqIllEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %168, ptr noundef nonnull align 8 dereferenceable(16) %170)
          to label %172 unwind label %188

172:                                              ; preds = %165
  br i1 %171, label %184, label %173

173:                                              ; preds = %172
  %174 = load i64, ptr %22, align 8, !tbaa !5
  %175 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %174) #7
  %176 = getelementptr inbounds %"struct.std::pair", ptr %175, i32 0, i32 1
  %177 = load i64, ptr %176, align 8, !tbaa !12
  %178 = load i64, ptr %22, align 8, !tbaa !5
  %179 = sub nsw i64 %178, 1
  %180 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %179) #7
  %181 = getelementptr inbounds %"struct.std::pair", ptr %180, i32 0, i32 1
  %182 = load i64, ptr %181, align 8, !tbaa !12
  %183 = icmp sgt i64 %177, %182
  br i1 %183, label %184, label %192

184:                                              ; preds = %173, %172
  %185 = load i64, ptr %22, align 8, !tbaa !5
  %186 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %185) #7
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(16) %186)
          to label %187 unwind label %188

187:                                              ; preds = %184
  br label %192

188:                                              ; preds = %184, %165
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %11, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %360

192:                                              ; preds = %187, %173
  br label %193

193:                                              ; preds = %192
  %194 = load i64, ptr %22, align 8, !tbaa !5
  %195 = add nsw i64 %194, 1
  store i64 %195, ptr %22, align 8, !tbaa !5
  br label %160, !llvm.loop !15

196:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store i64 0, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store i64 0, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %197 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %198 = sub i64 %197, 1
  store i64 %198, ptr %25, align 8, !tbaa !5
  br label %199

199:                                              ; preds = %239, %196
  %200 = load i64, ptr %24, align 8, !tbaa !5
  %201 = load i64, ptr %25, align 8, !tbaa !5
  %202 = icmp slt i64 %200, %201
  br i1 %202, label %203, label %240

203:                                              ; preds = %199
  %204 = load i64, ptr %24, align 8, !tbaa !5
  %205 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %204) #7
  %206 = getelementptr inbounds %"struct.std::pair", ptr %205, i32 0, i32 0
  %207 = load i64, ptr %206, align 8, !tbaa !16
  %208 = load i64, ptr %25, align 8, !tbaa !5
  %209 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %208) #7
  %210 = getelementptr inbounds %"struct.std::pair", ptr %209, i32 0, i32 0
  %211 = load i64, ptr %210, align 8, !tbaa !16
  %212 = add nsw i64 %207, %211
  %213 = load i64, ptr %3, align 8, !tbaa !5
  %214 = icmp sle i64 %212, %213
  br i1 %214, label %215, label %236

215:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %216 = load i64, ptr %24, align 8, !tbaa !5
  %217 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %216) #7
  %218 = getelementptr inbounds %"struct.std::pair", ptr %217, i32 0, i32 1
  %219 = load i64, ptr %218, align 8, !tbaa !12
  %220 = load i64, ptr %25, align 8, !tbaa !5
  %221 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %220) #7
  %222 = getelementptr inbounds %"struct.std::pair", ptr %221, i32 0, i32 1
  %223 = load i64, ptr %222, align 8, !tbaa !12
  %224 = add nsw i64 %219, %223
  store i64 %224, ptr %26, align 8, !tbaa !5
  %225 = load i64, ptr %23, align 8, !tbaa !5
  %226 = load i64, ptr %26, align 8, !tbaa !5
  %227 = icmp sgt i64 %225, %226
  br i1 %227, label %228, label %230

228:                                              ; preds = %215
  %229 = load i64, ptr %23, align 8, !tbaa !5
  br label %232

230:                                              ; preds = %215
  %231 = load i64, ptr %26, align 8, !tbaa !5
  br label %232

232:                                              ; preds = %230, %228
  %233 = phi i64 [ %229, %228 ], [ %231, %230 ]
  store i64 %233, ptr %23, align 8, !tbaa !5
  %234 = load i64, ptr %24, align 8, !tbaa !5
  %235 = add nsw i64 %234, 1
  store i64 %235, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %239

236:                                              ; preds = %203
  %237 = load i64, ptr %25, align 8, !tbaa !5
  %238 = add nsw i64 %237, -1
  store i64 %238, ptr %25, align 8, !tbaa !5
  br label %239

239:                                              ; preds = %236, %232
  br label %199, !llvm.loop !17

240:                                              ; preds = %199
  store i64 0, ptr %24, align 8, !tbaa !5
  %241 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  %242 = sub i64 %241, 1
  store i64 %242, ptr %25, align 8, !tbaa !5
  br label %243

243:                                              ; preds = %283, %240
  %244 = load i64, ptr %24, align 8, !tbaa !5
  %245 = load i64, ptr %25, align 8, !tbaa !5
  %246 = icmp slt i64 %244, %245
  br i1 %246, label %247, label %284

247:                                              ; preds = %243
  %248 = load i64, ptr %24, align 8, !tbaa !5
  %249 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %248) #7
  %250 = getelementptr inbounds %"struct.std::pair", ptr %249, i32 0, i32 0
  %251 = load i64, ptr %250, align 8, !tbaa !16
  %252 = load i64, ptr %25, align 8, !tbaa !5
  %253 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %252) #7
  %254 = getelementptr inbounds %"struct.std::pair", ptr %253, i32 0, i32 0
  %255 = load i64, ptr %254, align 8, !tbaa !16
  %256 = add nsw i64 %251, %255
  %257 = load i64, ptr %4, align 8, !tbaa !5
  %258 = icmp sle i64 %256, %257
  br i1 %258, label %259, label %280

259:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %260 = load i64, ptr %24, align 8, !tbaa !5
  %261 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %260) #7
  %262 = getelementptr inbounds %"struct.std::pair", ptr %261, i32 0, i32 1
  %263 = load i64, ptr %262, align 8, !tbaa !12
  %264 = load i64, ptr %25, align 8, !tbaa !5
  %265 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %264) #7
  %266 = getelementptr inbounds %"struct.std::pair", ptr %265, i32 0, i32 1
  %267 = load i64, ptr %266, align 8, !tbaa !12
  %268 = add nsw i64 %263, %267
  store i64 %268, ptr %27, align 8, !tbaa !5
  %269 = load i64, ptr %23, align 8, !tbaa !5
  %270 = load i64, ptr %27, align 8, !tbaa !5
  %271 = icmp sgt i64 %269, %270
  br i1 %271, label %272, label %274

272:                                              ; preds = %259
  %273 = load i64, ptr %23, align 8, !tbaa !5
  br label %276

274:                                              ; preds = %259
  %275 = load i64, ptr %27, align 8, !tbaa !5
  br label %276

276:                                              ; preds = %274, %272
  %277 = phi i64 [ %273, %272 ], [ %275, %274 ]
  store i64 %277, ptr %23, align 8, !tbaa !5
  %278 = load i64, ptr %24, align 8, !tbaa !5
  %279 = add nsw i64 %278, 1
  store i64 %279, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %283

280:                                              ; preds = %247
  %281 = load i64, ptr %25, align 8, !tbaa !5
  %282 = add nsw i64 %281, -1
  store i64 %282, ptr %25, align 8, !tbaa !5
  br label %283

283:                                              ; preds = %280, %276
  br label %243, !llvm.loop !18

284:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  store i64 -1, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  store i64 -1, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %285 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %286 = sub i64 %285, 1
  store i64 %286, ptr %30, align 8, !tbaa !5
  br label %287

287:                                              ; preds = %301, %284
  %288 = load i64, ptr %30, align 8, !tbaa !5
  %289 = icmp sge i64 %288, 0
  br i1 %289, label %291, label %290

290:                                              ; preds = %287
  store i32 15, ptr %31, align 4
  br label %304

291:                                              ; preds = %287
  %292 = load i64, ptr %30, align 8, !tbaa !5
  %293 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %292) #7
  %294 = getelementptr inbounds %"struct.std::pair", ptr %293, i32 0, i32 0
  %295 = load i64, ptr %294, align 8, !tbaa !16
  %296 = load i64, ptr %3, align 8, !tbaa !5
  %297 = icmp sle i64 %295, %296
  br i1 %297, label %298, label %300

298:                                              ; preds = %291
  %299 = load i64, ptr %30, align 8, !tbaa !5
  store i64 %299, ptr %28, align 8, !tbaa !5
  store i32 15, ptr %31, align 4
  br label %304

300:                                              ; preds = %291
  br label %301

301:                                              ; preds = %300
  %302 = load i64, ptr %30, align 8, !tbaa !5
  %303 = add nsw i64 %302, -1
  store i64 %303, ptr %30, align 8, !tbaa !5
  br label %287, !llvm.loop !19

304:                                              ; preds = %298, %290
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %305

305:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %306 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  %307 = sub i64 %306, 1
  store i64 %307, ptr %32, align 8, !tbaa !5
  br label %308

308:                                              ; preds = %322, %305
  %309 = load i64, ptr %32, align 8, !tbaa !5
  %310 = icmp sge i64 %309, 0
  br i1 %310, label %312, label %311

311:                                              ; preds = %308
  store i32 18, ptr %31, align 4
  br label %325

312:                                              ; preds = %308
  %313 = load i64, ptr %32, align 8, !tbaa !5
  %314 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %313) #7
  %315 = getelementptr inbounds %"struct.std::pair", ptr %314, i32 0, i32 0
  %316 = load i64, ptr %315, align 8, !tbaa !16
  %317 = load i64, ptr %4, align 8, !tbaa !5
  %318 = icmp sle i64 %316, %317
  br i1 %318, label %319, label %321

319:                                              ; preds = %312
  %320 = load i64, ptr %32, align 8, !tbaa !5
  store i64 %320, ptr %29, align 8, !tbaa !5
  store i32 18, ptr %31, align 4
  br label %325

321:                                              ; preds = %312
  br label %322

322:                                              ; preds = %321
  %323 = load i64, ptr %32, align 8, !tbaa !5
  %324 = add nsw i64 %323, -1
  store i64 %324, ptr %32, align 8, !tbaa !5
  br label %308, !llvm.loop !20

325:                                              ; preds = %319, %311
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %326

326:                                              ; preds = %325
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  store i64 0, ptr %33, align 8, !tbaa !5
  %327 = load i64, ptr %28, align 8, !tbaa !5
  %328 = icmp sge i64 %327, 0
  br i1 %328, label %329, label %342

329:                                              ; preds = %326
  %330 = load i64, ptr %29, align 8, !tbaa !5
  %331 = icmp sge i64 %330, 0
  br i1 %331, label %332, label %342

332:                                              ; preds = %329
  %333 = load i64, ptr %28, align 8, !tbaa !5
  %334 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %333) #7
  %335 = getelementptr inbounds %"struct.std::pair", ptr %334, i32 0, i32 1
  %336 = load i64, ptr %335, align 8, !tbaa !12
  %337 = load i64, ptr %29, align 8, !tbaa !5
  %338 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %337) #7
  %339 = getelementptr inbounds %"struct.std::pair", ptr %338, i32 0, i32 1
  %340 = load i64, ptr %339, align 8, !tbaa !12
  %341 = add nsw i64 %336, %340
  store i64 %341, ptr %33, align 8, !tbaa !5
  br label %342

342:                                              ; preds = %332, %329, %326
  %343 = load i64, ptr %23, align 8, !tbaa !5
  %344 = load i64, ptr %33, align 8, !tbaa !5
  %345 = icmp sgt i64 %343, %344
  br i1 %345, label %346, label %348

346:                                              ; preds = %342
  %347 = load i64, ptr %23, align 8, !tbaa !5
  br label %350

348:                                              ; preds = %342
  %349 = load i64, ptr %33, align 8, !tbaa !5
  br label %350

350:                                              ; preds = %348, %346
  %351 = phi i64 [ %347, %346 ], [ %349, %348 ]
  store i64 %351, ptr %23, align 8, !tbaa !5
  %352 = load i64, ptr %23, align 8, !tbaa !5
  %353 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %352)
          to label %354 unwind label %356

354:                                              ; preds = %350
  store i32 0, ptr %1, align 4
  store i32 1, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %355 = load i32, ptr %1, align 4
  ret i32 %355

356:                                              ; preds = %350
  %357 = landingpad { ptr, i32 }
          cleanup
  %358 = extractvalue { ptr, i32 } %357, 0
  store ptr %358, ptr %11, align 8
  %359 = extractvalue { ptr, i32 } %357, 1
  store i32 %359, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %360

360:                                              ; preds = %356, %188, %151, %112
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  br label %361

361:                                              ; preds = %360, %108, %83
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %362

362:                                              ; preds = %361
  %363 = load ptr, ptr %11, align 8
  %364 = load i32, ptr %12, align 4
  %365 = insertvalue { ptr, i32 } poison, ptr %363, 0
  %366 = insertvalue { ptr, i32 } %365, i32 %364, 1
  resume { ptr, i32 } %366
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #4 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) #3 align 2

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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 #7 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !6, i64 8}
!13 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = !{!13, !6, i64 0}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}
!20 = distinct !{!20, !11}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<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 }
%"struct.std::pair" = type { i64, i64 }

@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i8, align 1
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %16 = getelementptr inbounds i8, ptr %10, i64 8
  %17 = getelementptr inbounds i8, ptr %9, i64 8
  br label %20

._crit_edge:                                      ; preds = %39, %0
  %18 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %19 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %18, ptr %19)
          to label %44 unwind label %51

20:                                               ; preds = %.lr.ph, %39
  %.06795 = phi i64 [ 0, %.lr.ph ], [ %40, %39 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %22 = load i8, ptr %8, align 1, !tbaa !9
  switch i8 %22, label %39 [
    i8 67, label %23
    i8 68, label %31
  ]

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  %24 = 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) %6)
          to label %25 unwind label %29

25:                                               ; preds = %23
  %26 = extractvalue { i64, i64 } %24, 0
  store i64 %26, ptr %9, align 8
  %27 = extractvalue { i64, i64 } %24, 1
  store i64 %27, ptr %17, align 8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %28 unwind label %29

28:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br label %39

29:                                               ; preds = %25, %23
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br label %43

31:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %32 = 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) %6)
          to label %33 unwind label %37

33:                                               ; preds = %31
  %34 = extractvalue { i64, i64 } %32, 0
  store i64 %34, ptr %10, align 8
  %35 = extractvalue { i64, i64 } %32, 1
  store i64 %35, ptr %16, align 8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %36 unwind label %37

36:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %39

37:                                               ; preds = %33, %31
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %43

39:                                               ; preds = %20, %36, %28
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %40 = add nuw nsw i64 %.06795, 1
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %42 = icmp slt i64 %40, %41
  br i1 %42, label %20, label %._crit_edge, !llvm.loop !10

43:                                               ; preds = %37, %29
  %.pn92 = phi { ptr, i32 } [ %30, %29 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %179

44:                                               ; preds = %._crit_edge
  %45 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %46 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %45, ptr %46)
          to label %47 unwind label %51

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %48 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %.not = icmp eq i64 %48, 0
  br i1 %.not, label %55, label %49

49:                                               ; preds = %47
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(16) %50)
          to label %55 unwind label %53

51:                                               ; preds = %44, %._crit_edge
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %179

53:                                               ; preds = %57, %49
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %178

55:                                               ; preds = %49, %47
  %56 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %.not86 = icmp eq i64 %56, 0
  br i1 %.not86, label %59, label %57

57:                                               ; preds = %55
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(16) %58)
          to label %59 unwind label %53

59:                                               ; preds = %57, %55
  %60 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %61 = icmp ugt i64 %60, 1
  br i1 %61, label %.lr.ph98, label %.preheader

.preheader:                                       ; preds = %80, %59
  %62 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %63 = icmp ugt i64 %62, 1
  br i1 %63, label %.lr.ph100, label %._crit_edge101

.lr.ph98:                                         ; preds = %59, %80
  %.07896 = phi i64 [ %81, %80 ], [ 1, %59 ]
  %64 = add nsw i64 %.07896, -1
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %64) #8
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.07896) #8
  %67 = call noundef zeroext i1 @_ZSteqIllEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef nonnull align 8 dereferenceable(16) %66)
  br i1 %67, label %76, label %68

68:                                               ; preds = %.lr.ph98
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.07896) #8
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i64, ptr %70, align 8, !tbaa !12
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %64) #8
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  %74 = load i64, ptr %73, align 8, !tbaa !12
  %75 = icmp sgt i64 %71, %74
  br i1 %75, label %76, label %80

76:                                               ; preds = %68, %.lr.ph98
  %77 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.07896) #8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(16) %77)
          to label %80 unwind label %78

78:                                               ; preds = %76
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %178

80:                                               ; preds = %68, %76
  %81 = add nuw nsw i64 %.07896, 1
  %82 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %83 = icmp ult i64 %81, %82
  br i1 %83, label %.lr.ph98, label %.preheader, !llvm.loop !14

._crit_edge101:                                   ; preds = %103, %.preheader
  %84 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  %85 = add i64 %84, -1
  %86 = icmp sgt i64 %85, 0
  br i1 %86, label %.lr.ph106, label %._crit_edge107

.lr.ph100:                                        ; preds = %.preheader, %103
  %.07799 = phi i64 [ %104, %103 ], [ 1, %.preheader ]
  %87 = add nsw i64 %.07799, -1
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %87) #8
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.07799) #8
  %90 = call noundef zeroext i1 @_ZSteqIllEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %88, ptr noundef nonnull align 8 dereferenceable(16) %89)
  br i1 %90, label %99, label %91

91:                                               ; preds = %.lr.ph100
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.07799) #8
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  %94 = load i64, ptr %93, align 8, !tbaa !12
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %87) #8
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  %97 = load i64, ptr %96, align 8, !tbaa !12
  %98 = icmp sgt i64 %94, %97
  br i1 %98, label %99, label %103

99:                                               ; preds = %91, %.lr.ph100
  %100 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.07799) #8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(16) %100)
          to label %103 unwind label %101

101:                                              ; preds = %99
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %178

103:                                              ; preds = %91, %99
  %104 = add nuw nsw i64 %.07799, 1
  %105 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %106 = icmp ult i64 %104, %105
  br i1 %106, label %.lr.ph100, label %._crit_edge101, !llvm.loop !15

.lr.ph106:                                        ; preds = %._crit_edge101, %125
  %.068104 = phi i64 [ %.1, %125 ], [ %85, %._crit_edge101 ]
  %.069103 = phi i64 [ %.170, %125 ], [ 0, %._crit_edge101 ]
  %.073102 = phi i64 [ %.174, %125 ], [ 0, %._crit_edge101 ]
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.069103) #8
  %108 = load i64, ptr %107, align 8, !tbaa !16
  %109 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.068104) #8
  %110 = load i64, ptr %109, align 8, !tbaa !16
  %111 = add nsw i64 %110, %108
  %112 = load i64, ptr %2, align 8, !tbaa !5
  %.not90 = icmp sgt i64 %111, %112
  br i1 %.not90, label %123, label %113

113:                                              ; preds = %.lr.ph106
  %114 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.069103) #8
  %115 = getelementptr inbounds i8, ptr %114, i64 8
  %116 = load i64, ptr %115, align 8, !tbaa !12
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.068104) #8
  %118 = getelementptr inbounds i8, ptr %117, i64 8
  %119 = load i64, ptr %118, align 8, !tbaa !12
  %120 = add nsw i64 %119, %116
  %121 = call i64 @llvm.smax.i64(i64 %.073102, i64 %120)
  %122 = add nsw i64 %.069103, 1
  br label %125

123:                                              ; preds = %.lr.ph106
  %124 = add nsw i64 %.068104, -1
  br label %125

125:                                              ; preds = %123, %113
  %.174 = phi i64 [ %121, %113 ], [ %.073102, %123 ]
  %.170 = phi i64 [ %122, %113 ], [ %.069103, %123 ]
  %.1 = phi i64 [ %.068104, %113 ], [ %124, %123 ]
  %126 = icmp slt i64 %.170, %.1
  br i1 %126, label %.lr.ph106, label %._crit_edge107, !llvm.loop !17

._crit_edge107:                                   ; preds = %125, %._crit_edge101
  %.073.lcssa = phi i64 [ 0, %._crit_edge101 ], [ %.174, %125 ]
  %127 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %128 = add i64 %127, -1
  %129 = icmp sgt i64 %128, 0
  br i1 %129, label %.lr.ph112, label %._crit_edge113

.lr.ph112:                                        ; preds = %._crit_edge107, %148
  %.2110 = phi i64 [ %.3, %148 ], [ %128, %._crit_edge107 ]
  %.271109 = phi i64 [ %.372, %148 ], [ 0, %._crit_edge107 ]
  %.275108 = phi i64 [ %.376, %148 ], [ %.073.lcssa, %._crit_edge107 ]
  %130 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.271109) #8
  %131 = load i64, ptr %130, align 8, !tbaa !16
  %132 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.2110) #8
  %133 = load i64, ptr %132, align 8, !tbaa !16
  %134 = add nsw i64 %133, %131
  %135 = load i64, ptr %3, align 8, !tbaa !5
  %.not89 = icmp sgt i64 %134, %135
  br i1 %.not89, label %146, label %136

136:                                              ; preds = %.lr.ph112
  %137 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.271109) #8
  %138 = getelementptr inbounds i8, ptr %137, i64 8
  %139 = load i64, ptr %138, align 8, !tbaa !12
  %140 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.2110) #8
  %141 = getelementptr inbounds i8, ptr %140, i64 8
  %142 = load i64, ptr %141, align 8, !tbaa !12
  %143 = add nsw i64 %142, %139
  %144 = call i64 @llvm.smax.i64(i64 %.275108, i64 %143)
  %145 = add nsw i64 %.271109, 1
  br label %148

146:                                              ; preds = %.lr.ph112
  %147 = add nsw i64 %.2110, -1
  br label %148

148:                                              ; preds = %146, %136
  %.376 = phi i64 [ %144, %136 ], [ %.275108, %146 ]
  %.372 = phi i64 [ %145, %136 ], [ %.271109, %146 ]
  %.3 = phi i64 [ %.2110, %136 ], [ %147, %146 ]
  %149 = icmp slt i64 %.372, %.3
  br i1 %149, label %.lr.ph112, label %._crit_edge113, !llvm.loop !18

._crit_edge113:                                   ; preds = %148, %._crit_edge107
  %.275.lcssa = phi i64 [ %.073.lcssa, %._crit_edge107 ], [ %.376, %148 ]
  %150 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  br label %151

151:                                              ; preds = %153, %._crit_edge113
  %.064.in = phi i64 [ %150, %._crit_edge113 ], [ %.064, %153 ]
  %.064 = add i64 %.064.in, -1
  %152 = icmp sgt i64 %.064, -1
  br i1 %152, label %153, label %157

153:                                              ; preds = %151
  %154 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.064) #8
  %155 = load i64, ptr %154, align 8, !tbaa !16
  %156 = load i64, ptr %2, align 8, !tbaa !5
  %.not87 = icmp sgt i64 %155, %156
  br i1 %.not87, label %151, label %157, !llvm.loop !19

157:                                              ; preds = %153, %151
  %.066 = phi i64 [ -1, %151 ], [ %.064, %153 ]
  %158 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  br label %159

159:                                              ; preds = %161, %157
  %.063.in = phi i64 [ %158, %157 ], [ %.063, %161 ]
  %.063 = add i64 %.063.in, -1
  %160 = icmp sgt i64 %.063, -1
  br i1 %160, label %161, label %165

161:                                              ; preds = %159
  %162 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.063) #8
  %163 = load i64, ptr %162, align 8, !tbaa !16
  %164 = load i64, ptr %3, align 8, !tbaa !5
  %.not88 = icmp sgt i64 %163, %164
  br i1 %.not88, label %159, label %165, !llvm.loop !20

165:                                              ; preds = %161, %159
  %.065 = phi i64 [ -1, %159 ], [ %.063, %161 ]
  %166 = or i64 %.065, %.066
  %or.cond = icmp sgt i64 %166, -1
  br i1 %or.cond, label %167, label %175

167:                                              ; preds = %165
  %168 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.066) #8
  %169 = getelementptr inbounds i8, ptr %168, i64 8
  %170 = load i64, ptr %169, align 8, !tbaa !12
  %171 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.065) #8
  %172 = getelementptr inbounds i8, ptr %171, i64 8
  %173 = load i64, ptr %172, align 8, !tbaa !12
  %174 = add nsw i64 %173, %170
  br label %175

175:                                              ; preds = %167, %165
  %.0 = phi i64 [ %174, %167 ], [ 0, %165 ]
  %176 = call i64 @llvm.smax.i64(i64 %.275.lcssa, i64 %.0)
  %177 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %176)
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret i32 0

178:                                              ; preds = %101, %78, %53
  %.pn = phi { ptr, i32 } [ %79, %78 ], [ %102, %101 ], [ %54, %53 ]
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  br label %179

179:                                              ; preds = %178, %51, %43
  %.pn92.pn = phi { ptr, i32 } [ %.pn92, %43 ], [ %.pn, %178 ], [ %52, %51 ]
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn92.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #5

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #7

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


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