; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/283 Division 2/Problem B (B)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::greater" = type { i8 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

37:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %56, %37
  %39 = load i32, ptr %18, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %47, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %63

43:                                               ; preds = %327, %171, %0
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %16, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %17, align 4
  br label %331

47:                                               ; preds = %38
  %48 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %15)
          to label %49 unwind label %59

49:                                               ; preds = %47
  %50 = load i8, ptr %15, align 1, !tbaa !9
  %51 = sext i8 %50 to i32
  %52 = sub nsw i32 %51, 48
  %53 = load i32, ptr %18, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %54
  store i32 %52, ptr %55, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %49
  %57 = load i32, ptr %18, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %18, align 4, !tbaa !5
  br label %38, !llvm.loop !10

59:                                               ; preds = %47
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %16, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %331

63:                                               ; preds = %42
  %64 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 0
  %65 = load i32, ptr %64, align 16, !tbaa !5
  store i32 %65, ptr %8, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  store i32 1, ptr %5, align 4, !tbaa !5
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %114, %63
  %67 = load i32, ptr %19, align 4, !tbaa !5
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %118

71:                                               ; preds = %66
  %72 = load i32, ptr %19, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = icmp eq i32 %75, %76
  br i1 %77, label %78, label %81

78:                                               ; preds = %71
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %6, align 4, !tbaa !5
  br label %113

81:                                               ; preds = %71
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = icmp sgt i32 %82, %83
  br i1 %84, label %85, label %94

85:                                               ; preds = %81
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %86 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %87 unwind label %90

87:                                               ; preds = %85
  store i64 %86, ptr %20, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %88 unwind label %90

88:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %89 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %89, ptr %5, align 4, !tbaa !5
  br label %107

90:                                               ; preds = %87, %85
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %16, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %117

94:                                               ; preds = %81
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = icmp eq i32 %95, %96
  br i1 %97, label %98, label %106

98:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %99 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %100 unwind label %102

100:                                              ; preds = %98
  store i64 %99, ptr %21, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %101 unwind label %102

101:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %106

102:                                              ; preds = %100, %98
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %16, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %117

106:                                              ; preds = %101, %94
  br label %107

107:                                              ; preds = %106, %88
  store i32 1, ptr %6, align 4, !tbaa !5
  %108 = load i32, ptr %19, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  store i32 %111, ptr %8, align 4, !tbaa !5
  %112 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %112, ptr %7, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %107, %78
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %19, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %19, align 4, !tbaa !5
  br label %66, !llvm.loop !12

117:                                              ; preds = %102, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %331

118:                                              ; preds = %70
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = icmp eq i32 %119, 1
  br i1 %120, label %121, label %131

121:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 1, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %122 = load i32, ptr %2, align 4, !tbaa !5
  %123 = sub nsw i32 %122, 1
  store i32 %123, ptr %24, align 4, !tbaa !5
  %124 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %125 unwind label %127

125:                                              ; preds = %121
  store i64 %124, ptr %22, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %126 unwind label %127

126:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %171

127:                                              ; preds = %125, %121
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %16, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %331

131:                                              ; preds = %118
  %132 = load i32, ptr %2, align 4, !tbaa !5
  %133 = sub nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = load i32, ptr %2, align 4, !tbaa !5
  %138 = sub nsw i32 %137, 2
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = icmp eq i32 %136, %141
  br i1 %142, label %143, label %170

143:                                              ; preds = %131
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = load i32, ptr %5, align 4, !tbaa !5
  %146 = icmp sgt i32 %144, %145
  br i1 %146, label %147, label %156

147:                                              ; preds = %143
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %148 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %149 unwind label %152

149:                                              ; preds = %147
  store i64 %148, ptr %25, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(8) %25)
          to label %150 unwind label %152

150:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  %151 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %151, ptr %5, align 4, !tbaa !5
  br label %169

152:                                              ; preds = %149, %147
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %16, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %331

156:                                              ; preds = %143
  %157 = load i32, ptr %6, align 4, !tbaa !5
  %158 = load i32, ptr %5, align 4, !tbaa !5
  %159 = icmp eq i32 %157, %158
  br i1 %159, label %160, label %168

160:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %161 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %162 unwind label %164

162:                                              ; preds = %160
  store i64 %161, ptr %26, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(8) %26)
          to label %163 unwind label %164

163:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %168

164:                                              ; preds = %162, %160
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %16, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %331

168:                                              ; preds = %163, %156
  br label %169

169:                                              ; preds = %168, %150
  br label %170

170:                                              ; preds = %169, %131
  br label %171

171:                                              ; preds = %170, %126
  %172 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %173 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %172, ptr %173, align 8
  %174 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %175 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %174, ptr %175, align 8
  %176 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8
  %178 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEESt7greaterIS3_EEvT_SB_T0_(ptr %177, ptr %179)
          to label %180 unwind label %43

180:                                              ; preds = %171
  %181 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0) #6
  %182 = getelementptr inbounds %"struct.std::pair", ptr %181, i32 0, i32 1
  %183 = load i32, ptr %182, align 4, !tbaa !13
  store i32 %183, ptr %11, align 4, !tbaa !5
  %184 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0) #6
  %185 = getelementptr inbounds %"struct.std::pair", ptr %184, i32 0, i32 1
  %186 = load i32, ptr %185, align 4, !tbaa !13
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = sub nsw i32 10, %189
  %191 = srem i32 %190, 10
  store i32 %191, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %212, %180
  %193 = load i32, ptr %30, align 4, !tbaa !5
  %194 = load i32, ptr %2, align 4, !tbaa !5
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %215

197:                                              ; preds = %192
  %198 = load i32, ptr %30, align 4, !tbaa !5
  %199 = load i32, ptr %11, align 4, !tbaa !5
  %200 = add nsw i32 %198, %199
  %201 = load i32, ptr %2, align 4, !tbaa !5
  %202 = srem i32 %200, %201
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = load i32, ptr %10, align 4, !tbaa !5
  %207 = add nsw i32 %205, %206
  %208 = srem i32 %207, 10
  %209 = load i32, ptr %30, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [1000 x i32], ptr %4, i64 0, i64 %210
  store i32 %208, ptr %211, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %197
  %213 = load i32, ptr %30, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %30, align 4, !tbaa !5
  br label %192, !llvm.loop !15

215:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 1, ptr %31, align 4, !tbaa !5
  br label %216

216:                                              ; preds = %304, %215
  %217 = load i32, ptr %31, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %220 = icmp ult i64 %218, %219
  br i1 %220, label %222, label %221

221:                                              ; preds = %216
  store i32 11, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %307

222:                                              ; preds = %216
  %223 = load i32, ptr %31, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %224) #6
  %226 = getelementptr inbounds %"struct.std::pair", ptr %225, i32 0, i32 1
  %227 = load i32, ptr %226, align 4, !tbaa !13
  store i32 %227, ptr %11, align 4, !tbaa !5
  %228 = load i32, ptr %11, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = sub nsw i32 10, %231
  %233 = srem i32 %232, 10
  store i32 %233, ptr %10, align 4, !tbaa !5
  store i32 -1, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 0, ptr %33, align 4, !tbaa !5
  br label %234

234:                                              ; preds = %271, %222
  %235 = load i32, ptr %33, align 4, !tbaa !5
  %236 = load i32, ptr %2, align 4, !tbaa !5
  %237 = icmp slt i32 %235, %236
  br i1 %237, label %239, label %238

238:                                              ; preds = %234
  store i32 14, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %274

239:                                              ; preds = %234
  %240 = load i32, ptr %33, align 4, !tbaa !5
  %241 = load i32, ptr %11, align 4, !tbaa !5
  %242 = add nsw i32 %240, %241
  %243 = load i32, ptr %2, align 4, !tbaa !5
  %244 = srem i32 %242, %243
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = load i32, ptr %10, align 4, !tbaa !5
  %249 = add nsw i32 %247, %248
  %250 = srem i32 %249, 10
  store i32 %250, ptr %12, align 4, !tbaa !5
  %251 = load i32, ptr %12, align 4, !tbaa !5
  %252 = load i32, ptr %33, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [1000 x i32], ptr %4, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %256 = icmp sgt i32 %251, %255
  br i1 %256, label %257, label %259

257:                                              ; preds = %239
  %258 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %258, ptr %33, align 4, !tbaa !5
  br label %270

259:                                              ; preds = %239
  %260 = load i32, ptr %12, align 4, !tbaa !5
  %261 = load i32, ptr %33, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [1000 x i32], ptr %4, i64 0, i64 %262
  %264 = load i32, ptr %263, align 4, !tbaa !5
  %265 = icmp slt i32 %260, %264
  br i1 %265, label %266, label %269

266:                                              ; preds = %259
  %267 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %267, ptr %13, align 4, !tbaa !5
  %268 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %268, ptr %33, align 4, !tbaa !5
  br label %269

269:                                              ; preds = %266, %259
  br label %270

270:                                              ; preds = %269, %257
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %33, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %33, align 4, !tbaa !5
  br label %234, !llvm.loop !16

274:                                              ; preds = %238
  %275 = load i32, ptr %13, align 4, !tbaa !5
  %276 = icmp ne i32 %275, -1
  br i1 %276, label %277, label %303

277:                                              ; preds = %274
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %278 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %278, ptr %34, align 4, !tbaa !5
  br label %279

279:                                              ; preds = %299, %277
  %280 = load i32, ptr %34, align 4, !tbaa !5
  %281 = load i32, ptr %2, align 4, !tbaa !5
  %282 = icmp slt i32 %280, %281
  br i1 %282, label %284, label %283

283:                                              ; preds = %279
  store i32 17, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %302

284:                                              ; preds = %279
  %285 = load i32, ptr %34, align 4, !tbaa !5
  %286 = load i32, ptr %11, align 4, !tbaa !5
  %287 = add nsw i32 %285, %286
  %288 = load i32, ptr %2, align 4, !tbaa !5
  %289 = srem i32 %287, %288
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %290
  %292 = load i32, ptr %291, align 4, !tbaa !5
  %293 = load i32, ptr %10, align 4, !tbaa !5
  %294 = add nsw i32 %292, %293
  %295 = srem i32 %294, 10
  %296 = load i32, ptr %34, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [1000 x i32], ptr %4, i64 0, i64 %297
  store i32 %295, ptr %298, align 4, !tbaa !5
  br label %299

299:                                              ; preds = %284
  %300 = load i32, ptr %34, align 4, !tbaa !5
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %34, align 4, !tbaa !5
  br label %279, !llvm.loop !17

302:                                              ; preds = %283
  br label %303

303:                                              ; preds = %302, %274
  br label %304

304:                                              ; preds = %303
  %305 = load i32, ptr %31, align 4, !tbaa !5
  %306 = add nsw i32 %305, 1
  store i32 %306, ptr %31, align 4, !tbaa !5
  br label %216, !llvm.loop !18

307:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  store i32 0, ptr %35, align 4, !tbaa !5
  br label %308

308:                                              ; preds = %320, %307
  %309 = load i32, ptr %35, align 4, !tbaa !5
  %310 = load i32, ptr %2, align 4, !tbaa !5
  %311 = icmp slt i32 %309, %310
  br i1 %311, label %313, label %312

312:                                              ; preds = %308
  store i32 20, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %327

313:                                              ; preds = %308
  %314 = load i32, ptr %35, align 4, !tbaa !5
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [1000 x i32], ptr %4, i64 0, i64 %315
  %317 = load i32, ptr %316, align 4, !tbaa !5
  %318 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %317)
          to label %319 unwind label %323

319:                                              ; preds = %313
  br label %320

320:                                              ; preds = %319
  %321 = load i32, ptr %35, align 4, !tbaa !5
  %322 = add nsw i32 %321, 1
  store i32 %322, ptr %35, align 4, !tbaa !5
  br label %308, !llvm.loop !19

323:                                              ; preds = %313
  %324 = landingpad { ptr, i32 }
          cleanup
  %325 = extractvalue { ptr, i32 } %324, 0
  store ptr %325, ptr %16, align 8
  %326 = extractvalue { ptr, i32 } %324, 1
  store i32 %326, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %331

327:                                              ; preds = %312
  %328 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %329 unwind label %43

329:                                              ; preds = %327
  store i32 0, ptr %1, align 4
  store i32 1, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4000, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %330 = load i32, ptr %1, align 4
  ret i32 %330

331:                                              ; preds = %323, %164, %152, %127, %117, %59, %43
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4000, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %332

332:                                              ; preds = %331
  %333 = load ptr, ptr %16, align 8
  %334 = load i32, ptr %17, align 4
  %335 = insertvalue { ptr, i32 } poison, ptr %333, 0
  %336 = insertvalue { ptr, i32 } %335, i32 %334, 1
  resume { ptr, i32 } %336
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{!14, !6, i64 4}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

._crit_edge.thread:                               ; preds = %0
  store i32 0, ptr %5, align 4, !tbaa !5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %._crit_edge90.thread

._crit_edge:                                      ; preds = %.lr.ph
  %.pre = load i32, ptr %2, align 16, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  store i32 1, ptr %4, align 4, !tbaa !5
  %18 = icmp sgt i32 %26, 1
  br i1 %18, label %.lr.ph89, label %._crit_edge90.thread

19:                                               ; preds = %._crit_edge108, %93
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %171

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %7)
  %22 = load i8, ptr %7, align 1, !tbaa !9
  %23 = sext i8 %22 to i32
  %24 = add nsw i32 %23, -48
  %25 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %indvars.iv
  store i32 %24, ptr %25, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !10

._crit_edge90:                                    ; preds = %56
  %29 = icmp eq i32 %.2, 1
  br i1 %29, label %._crit_edge90.thread, label %67

.lr.ph89:                                         ; preds = %._crit_edge, %56
  %30 = phi i32 [ %57, %56 ], [ %26, %._crit_edge ]
  %31 = phi i32 [ %58, %56 ], [ 1, %._crit_edge ]
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %56 ], [ 1, %._crit_edge ]
  %.05287 = phi i32 [ %.2, %56 ], [ 1, %._crit_edge ]
  %.06285 = phi i32 [ %.163, %56 ], [ %.pre, %._crit_edge ]
  %32 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %indvars.iv110
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = icmp eq i32 %33, %.06285
  br i1 %34, label %35, label %37

35:                                               ; preds = %.lr.ph89
  %36 = add nsw i32 %31, 1
  store i32 %36, ptr %4, align 4, !tbaa !5
  br label %56

37:                                               ; preds = %.lr.ph89
  %38 = icmp sgt i32 %31, %.05287
  br i1 %38, label %39, label %46

39:                                               ; preds = %37
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %40 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %41 unwind label %44

41:                                               ; preds = %39
  store i64 %40, ptr %8, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %42 unwind label %44

42:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %43 = load i32, ptr %4, align 4, !tbaa !5
  br label %54

44:                                               ; preds = %41, %39
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %171

46:                                               ; preds = %37
  %47 = icmp eq i32 %31, %.05287
  br i1 %47, label %48, label %54

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %49 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %50 unwind label %52

50:                                               ; preds = %48
  store i64 %49, ptr %9, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %51 unwind label %52

51:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %54

52:                                               ; preds = %50, %48
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %171

54:                                               ; preds = %46, %51, %42
  %.153 = phi i32 [ %43, %42 ], [ %31, %51 ], [ %.05287, %46 ]
  store i32 1, ptr %4, align 4, !tbaa !5
  %55 = trunc nuw nsw i64 %indvars.iv110 to i32
  store i32 %55, ptr %5, align 4, !tbaa !5
  %.pre127 = load i32, ptr %1, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %35, %54
  %57 = phi i32 [ %30, %35 ], [ %.pre127, %54 ]
  %58 = phi i32 [ %36, %35 ], [ 1, %54 ]
  %.163 = phi i32 [ %.06285, %35 ], [ %33, %54 ]
  %.2 = phi i32 [ %.05287, %35 ], [ %.153, %54 ]
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %59 = sext i32 %57 to i64
  %60 = icmp slt i64 %indvars.iv.next111, %59
  br i1 %60, label %.lr.ph89, label %._crit_edge90, !llvm.loop !12

._crit_edge90.thread:                             ; preds = %._crit_edge.thread, %._crit_edge, %._crit_edge90
  %.lcssa79130 = phi i32 [ %57, %._crit_edge90 ], [ %16, %._crit_edge.thread ], [ %26, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %61 = add nsw i32 %.lcssa79130, -1
  store i32 %61, ptr %12, align 4, !tbaa !5
  %62 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %63 unwind label %65

63:                                               ; preds = %._crit_edge90.thread
  store i64 %62, ptr %10, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %64 unwind label %65

64:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %93

65:                                               ; preds = %63, %._crit_edge90.thread
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %171

67:                                               ; preds = %._crit_edge90
  %68 = add nsw i32 %57, -1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %57, -2
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = icmp eq i32 %71, %75
  br i1 %76, label %77, label %93

77:                                               ; preds = %67
  %78 = icmp sgt i32 %58, %.2
  br i1 %78, label %79, label %85

79:                                               ; preds = %77
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %80 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %81 unwind label %83

81:                                               ; preds = %79
  store i64 %80, ptr %13, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %82 unwind label %83

82:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %93

83:                                               ; preds = %81, %79
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %171

85:                                               ; preds = %77
  %86 = icmp eq i32 %58, %.2
  br i1 %86, label %87, label %93

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %88 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %89 unwind label %91

89:                                               ; preds = %87
  store i64 %88, ptr %14, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %90 unwind label %91

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

91:                                               ; preds = %89, %87
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %171

93:                                               ; preds = %67, %85, %90, %82, %64
  %94 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %95 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEESt7greaterIS3_EEvT_SB_T0_(ptr %94, ptr %95)
          to label %96 unwind label %19

96:                                               ; preds = %93
  %97 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #7
  %98 = getelementptr inbounds i8, ptr %97, i64 4
  %99 = load i32, ptr %98, align 4, !tbaa !13
  %100 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #7
  %101 = getelementptr inbounds i8, ptr %100, i64 4
  %102 = load i32, ptr %101, align 4, !tbaa !13
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = sub nsw i32 10, %105
  %107 = srem i32 %106, 10
  %108 = load i32, ptr %1, align 4, !tbaa !5
  %109 = icmp sgt i32 %108, 0
  br i1 %109, label %.lr.ph94.preheader, label %.preheader78

.lr.ph94.preheader:                               ; preds = %96
  %wide.trip.count = zext nneg i32 %108 to i64
  br label %.lr.ph94

.preheader78:                                     ; preds = %.lr.ph94, %96
  %110 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %111 = icmp ugt i64 %110, 1
  br i1 %111, label %.lr.ph105, label %.preheader

.lr.ph94:                                         ; preds = %.lr.ph94.preheader, %.lr.ph94
  %indvars.iv113 = phi i64 [ 0, %.lr.ph94.preheader ], [ %indvars.iv.next114, %.lr.ph94 ]
  %112 = trunc i64 %indvars.iv113 to i32
  %113 = add i32 %99, %112
  %114 = srem i32 %113, %108
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = add nsw i32 %117, %107
  %119 = srem i32 %118, 10
  %120 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %indvars.iv113
  store i32 %119, ptr %120, align 4, !tbaa !5
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next114, %wide.trip.count
  br i1 %exitcond.not, label %.preheader78, label %.lr.ph94, !llvm.loop !15

.preheader:                                       ; preds = %.loopexit, %.preheader78
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = icmp sgt i32 %121, 0
  br i1 %122, label %.lr.ph107, label %._crit_edge108

.lr.ph105:                                        ; preds = %.preheader78, %.loopexit
  %indvars.iv121 = phi i64 [ %indvars.iv.next122, %.loopexit ], [ 1, %.preheader78 ]
  %123 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv121) #7
  %124 = getelementptr inbounds i8, ptr %123, i64 4
  %125 = load i32, ptr %124, align 4, !tbaa !13
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = sub nsw i32 10, %128
  %130 = srem i32 %129, 10
  %131 = load i32, ptr %1, align 4, !tbaa !5
  %132 = icmp sgt i32 %131, 0
  br i1 %132, label %.lr.ph98, label %.loopexit

._crit_edge99:                                    ; preds = %.lr.ph98
  %.not = icmp ne i32 %.161, -1
  %133 = icmp slt i32 %.161, %131
  %or.cond = and i1 %.not, %133
  br i1 %or.cond, label %.lr.ph103.preheader, label %.loopexit

.lr.ph103.preheader:                              ; preds = %._crit_edge99
  %134 = sext i32 %.161 to i64
  %wide.trip.count119 = zext nneg i32 %131 to i64
  br label %.lr.ph103

.lr.ph98:                                         ; preds = %.lr.ph105, %.lr.ph98
  %.04996 = phi i32 [ %147, %.lr.ph98 ], [ 0, %.lr.ph105 ]
  %.06095 = phi i32 [ %.161, %.lr.ph98 ], [ -1, %.lr.ph105 ]
  %135 = add nsw i32 %.04996, %125
  %136 = srem i32 %135, %131
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = add nsw i32 %139, %130
  %141 = srem i32 %140, 10
  %142 = zext nneg i32 %.04996 to i64
  %143 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = icmp sgt i32 %141, %144
  %146 = icmp slt i32 %141, %144
  %spec.select = select i1 %146, i32 %.04996, i32 %.06095
  %.161 = select i1 %145, i32 %.06095, i32 %spec.select
  %.not76 = icmp eq i32 %141, %144
  %.1 = select i1 %.not76, i32 %.04996, i32 %131
  %147 = add nuw nsw i32 %.1, 1
  %148 = icmp slt i32 %147, %131
  br i1 %148, label %.lr.ph98, label %._crit_edge99, !llvm.loop !16

.lr.ph103:                                        ; preds = %.lr.ph103.preheader, %.lr.ph103
  %indvars.iv116 = phi i64 [ %134, %.lr.ph103.preheader ], [ %indvars.iv.next117, %.lr.ph103 ]
  %149 = trunc i64 %indvars.iv116 to i32
  %150 = add i32 %125, %149
  %151 = srem i32 %150, %131
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = add nsw i32 %154, %130
  %156 = srem i32 %155, 10
  %157 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %indvars.iv116
  store i32 %156, ptr %157, align 4, !tbaa !5
  %indvars.iv.next117 = add nsw i64 %indvars.iv116, 1
  %exitcond120.not = icmp eq i64 %indvars.iv.next117, %wide.trip.count119
  br i1 %exitcond120.not, label %.loopexit, label %.lr.ph103, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph103, %.lr.ph105, %._crit_edge99
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %158 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %159 = icmp ugt i64 %158, %indvars.iv.next122
  br i1 %159, label %.lr.ph105, label %.preheader, !llvm.loop !18

._crit_edge108:                                   ; preds = %164, %.preheader
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %170 unwind label %19

.lr.ph107:                                        ; preds = %.preheader, %164
  %indvars.iv124 = phi i64 [ %indvars.iv.next125, %164 ], [ 0, %.preheader ]
  %161 = getelementptr inbounds [1000 x i32], ptr %3, i64 0, i64 %indvars.iv124
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %162)
          to label %164 unwind label %168

164:                                              ; preds = %.lr.ph107
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %165 = load i32, ptr %1, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = icmp slt i64 %indvars.iv.next125, %166
  br i1 %167, label %.lr.ph107, label %._crit_edge108, !llvm.loop !19

168:                                              ; preds = %.lr.ph107
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %171

170:                                              ; preds = %._crit_edge108
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

171:                                              ; preds = %44, %52, %168, %91, %83, %65, %19
  %.pn.pn = phi { ptr, i32 } [ %169, %168 ], [ %20, %19 ], [ %66, %65 ], [ %84, %83 ], [ %92, %91 ], [ %45, %44 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 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 @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { 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 = { "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 = !{!"int", !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 = distinct !{!12, !11}
!13 = !{!14, !6, i64 4}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}


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