; LLVM IR from Tunghohin/Competitive_Coding :: Codeforces (cf1559_D1)

; 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_istream" = type { ptr, i64, %"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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 }

@p1 = external dso_local global [1010 x i32], align 16
@p2 = external dso_local global [1010 x i32], align 16
@p1_s = external dso_local global [1010 x i32], align 16
@p2_s = external dso_local global [1010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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 i32, align 4
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::pair", align 4
  %23 = alloca ptr, align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"struct.std::pair", align 4
  store i32 0, ptr %1, align 4
  %27 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %28 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %29 = getelementptr i8, ptr %28, i64 -24
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %30
  %32 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %31, ptr noundef null)
  %33 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %34 = getelementptr i8, ptr %33, i64 -24
  %35 = load i64, ptr %34, align 8
  %36 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %35
  %37 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %36, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %41

41:                                               ; preds = %61, %0
  %42 = load i32, ptr %5, align 4, !tbaa !8
  %43 = load i32, ptr %2, align 4, !tbaa !8
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %64

46:                                               ; preds = %41
  %47 = load i32, ptr %5, align 4, !tbaa !8
  %48 = load i32, ptr %5, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [1010 x i32], ptr @p1, i64 0, i64 %49
  store i32 %47, ptr %50, align 4, !tbaa !8
  %51 = load i32, ptr %5, align 4, !tbaa !8
  %52 = load i32, ptr %5, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [1010 x i32], ptr @p2, i64 0, i64 %53
  store i32 %51, ptr %54, align 4, !tbaa !8
  %55 = load i32, ptr %5, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %56
  store i32 1, ptr %57, align 4, !tbaa !8
  %58 = load i32, ptr %5, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %59
  store i32 1, ptr %60, align 4, !tbaa !8
  br label %61

61:                                               ; preds = %46
  %62 = load i32, ptr %5, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %5, align 4, !tbaa !8
  br label %41, !llvm.loop !11

64:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 1, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 2, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 1, ptr %8, align 4, !tbaa !8
  br label %65

65:                                               ; preds = %96, %64
  %66 = load i32, ptr %8, align 4, !tbaa !8
  %67 = load i32, ptr %3, align 4, !tbaa !8
  %68 = icmp sle i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %99

70:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %73 = load i32, ptr %10, align 4, !tbaa !8
  %74 = call noundef i32 @_Z4findiPi(i32 noundef %73, ptr noundef @p1)
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !8
  %78 = load i32, ptr %9, align 4, !tbaa !8
  %79 = call noundef i32 @_Z4findiPi(i32 noundef %78, ptr noundef @p1)
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !8
  %83 = add nsw i32 %82, %77
  store i32 %83, ptr %81, align 4, !tbaa !8
  %84 = load i32, ptr %9, align 4, !tbaa !8
  %85 = call noundef i32 @_Z4findiPi(i32 noundef %84, ptr noundef @p1)
  %86 = load i32, ptr %10, align 4, !tbaa !8
  %87 = call noundef i32 @_Z4findiPi(i32 noundef %86, ptr noundef @p1)
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1010 x i32], ptr @p1, i64 0, i64 %88
  store i32 %85, ptr %89, align 4, !tbaa !8
  %90 = load i32, ptr %9, align 4, !tbaa !8
  %91 = call noundef i32 @_Z4findiPi(i32 noundef %90, ptr noundef @p1)
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %92
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %93)
  %95 = load i32, ptr %94, align 4, !tbaa !8
  store i32 %95, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %96

96:                                               ; preds = %70
  %97 = load i32, ptr %8, align 4, !tbaa !8
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %8, align 4, !tbaa !8
  br label %65, !llvm.loop !13

99:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %100

100:                                              ; preds = %131, %99
  %101 = load i32, ptr %11, align 4, !tbaa !8
  %102 = load i32, ptr %4, align 4, !tbaa !8
  %103 = icmp sle i32 %101, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %134

105:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %106, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %108 = load i32, ptr %13, align 4, !tbaa !8
  %109 = call noundef i32 @_Z4findiPi(i32 noundef %108, ptr noundef @p2)
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %113 = load i32, ptr %12, align 4, !tbaa !8
  %114 = call noundef i32 @_Z4findiPi(i32 noundef %113, ptr noundef @p2)
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !8
  %118 = add nsw i32 %117, %112
  store i32 %118, ptr %116, align 4, !tbaa !8
  %119 = load i32, ptr %12, align 4, !tbaa !8
  %120 = call noundef i32 @_Z4findiPi(i32 noundef %119, ptr noundef @p2)
  %121 = load i32, ptr %13, align 4, !tbaa !8
  %122 = call noundef i32 @_Z4findiPi(i32 noundef %121, ptr noundef @p2)
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [1010 x i32], ptr @p2, i64 0, i64 %123
  store i32 %120, ptr %124, align 4, !tbaa !8
  %125 = load i32, ptr %12, align 4, !tbaa !8
  %126 = call noundef i32 @_Z4findiPi(i32 noundef %125, ptr noundef @p2)
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %127
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %128)
  %130 = load i32, ptr %129, align 4, !tbaa !8
  store i32 %130, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %131

131:                                              ; preds = %105
  %132 = load i32, ptr %11, align 4, !tbaa !8
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %11, align 4, !tbaa !8
  br label %100, !llvm.loop !14

134:                                              ; preds = %104
  %135 = load i32, ptr %6, align 4, !tbaa !8
  %136 = load i32, ptr %2, align 4, !tbaa !8
  %137 = icmp eq i32 %135, %136
  br i1 %137, label %142, label %138

138:                                              ; preds = %134
  %139 = load i32, ptr %7, align 4, !tbaa !8
  %140 = load i32, ptr %2, align 4, !tbaa !8
  %141 = icmp eq i32 %139, %140
  br i1 %141, label %142, label %145

142:                                              ; preds = %138, %134
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %143, i8 noundef signext 10)
  br label %314

145:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #8
  store i8 1, ptr %16, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 1, ptr %17, align 4, !tbaa !8
  br label %146

146:                                              ; preds = %270, %145
  %147 = load i32, ptr %17, align 4, !tbaa !8
  %148 = load i32, ptr %2, align 4, !tbaa !8
  %149 = icmp sle i32 %147, %148
  br i1 %149, label %150, label %153

150:                                              ; preds = %146
  %151 = load i8, ptr %16, align 1, !tbaa !15, !range !17, !noundef !18
  %152 = trunc i8 %151 to i1
  br label %153

153:                                              ; preds = %150, %146
  %154 = phi i1 [ false, %146 ], [ %152, %150 ]
  br i1 %154, label %156, label %155

155:                                              ; preds = %153
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %273

156:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 1, ptr %19, align 4, !tbaa !8
  br label %157

157:                                              ; preds = %264, %156
  %158 = load i32, ptr %19, align 4, !tbaa !8
  %159 = load i32, ptr %17, align 4, !tbaa !8
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %161, label %164

161:                                              ; preds = %157
  %162 = load i8, ptr %16, align 1, !tbaa !15, !range !17, !noundef !18
  %163 = trunc i8 %162 to i1
  br label %164

164:                                              ; preds = %161, %157
  %165 = phi i1 [ false, %157 ], [ %163, %161 ]
  br i1 %165, label %167, label %166

166:                                              ; preds = %164
  store i32 14, ptr %18, align 4
  br label %267

167:                                              ; preds = %164
  %168 = load i32, ptr %17, align 4, !tbaa !8
  %169 = invoke noundef i32 @_Z4findiPi(i32 noundef %168, ptr noundef @p1)
          to label %170 unwind label %254

170:                                              ; preds = %167
  %171 = load i32, ptr %19, align 4, !tbaa !8
  %172 = invoke noundef i32 @_Z4findiPi(i32 noundef %171, ptr noundef @p1)
          to label %173 unwind label %254

173:                                              ; preds = %170
  %174 = icmp ne i32 %169, %172
  br i1 %174, label %175, label %263

175:                                              ; preds = %173
  %176 = load i32, ptr %17, align 4, !tbaa !8
  %177 = invoke noundef i32 @_Z4findiPi(i32 noundef %176, ptr noundef @p2)
          to label %178 unwind label %254

178:                                              ; preds = %175
  %179 = load i32, ptr %19, align 4, !tbaa !8
  %180 = invoke noundef i32 @_Z4findiPi(i32 noundef %179, ptr noundef @p2)
          to label %181 unwind label %254

181:                                              ; preds = %178
  %182 = icmp ne i32 %177, %180
  br i1 %182, label %183, label %263

183:                                              ; preds = %181
  %184 = load i32, ptr %19, align 4, !tbaa !8
  %185 = invoke noundef i32 @_Z4findiPi(i32 noundef %184, ptr noundef @p1)
          to label %186 unwind label %254

186:                                              ; preds = %183
  %187 = sext i32 %185 to i64
  %188 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !8
  %190 = load i32, ptr %17, align 4, !tbaa !8
  %191 = invoke noundef i32 @_Z4findiPi(i32 noundef %190, ptr noundef @p1)
          to label %192 unwind label %254

192:                                              ; preds = %186
  %193 = sext i32 %191 to i64
  %194 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !8
  %196 = add nsw i32 %195, %189
  store i32 %196, ptr %194, align 4, !tbaa !8
  %197 = load i32, ptr %17, align 4, !tbaa !8
  %198 = invoke noundef i32 @_Z4findiPi(i32 noundef %197, ptr noundef @p1)
          to label %199 unwind label %254

199:                                              ; preds = %192
  %200 = load i32, ptr %19, align 4, !tbaa !8
  %201 = invoke noundef i32 @_Z4findiPi(i32 noundef %200, ptr noundef @p1)
          to label %202 unwind label %254

202:                                              ; preds = %199
  %203 = sext i32 %201 to i64
  %204 = getelementptr inbounds [1010 x i32], ptr @p1, i64 0, i64 %203
  store i32 %198, ptr %204, align 4, !tbaa !8
  %205 = load i32, ptr %17, align 4, !tbaa !8
  %206 = invoke noundef i32 @_Z4findiPi(i32 noundef %205, ptr noundef @p1)
          to label %207 unwind label %254

207:                                              ; preds = %202
  %208 = sext i32 %206 to i64
  %209 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %208
  %210 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %209)
          to label %211 unwind label %254

211:                                              ; preds = %207
  %212 = load i32, ptr %210, align 4, !tbaa !8
  store i32 %212, ptr %6, align 4, !tbaa !8
  %213 = load i32, ptr %19, align 4, !tbaa !8
  %214 = invoke noundef i32 @_Z4findiPi(i32 noundef %213, ptr noundef @p2)
          to label %215 unwind label %254

215:                                              ; preds = %211
  %216 = sext i32 %214 to i64
  %217 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !8
  %219 = load i32, ptr %17, align 4, !tbaa !8
  %220 = invoke noundef i32 @_Z4findiPi(i32 noundef %219, ptr noundef @p2)
          to label %221 unwind label %254

221:                                              ; preds = %215
  %222 = sext i32 %220 to i64
  %223 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !8
  %225 = add nsw i32 %224, %218
  store i32 %225, ptr %223, align 4, !tbaa !8
  %226 = load i32, ptr %17, align 4, !tbaa !8
  %227 = invoke noundef i32 @_Z4findiPi(i32 noundef %226, ptr noundef @p2)
          to label %228 unwind label %254

228:                                              ; preds = %221
  %229 = load i32, ptr %19, align 4, !tbaa !8
  %230 = invoke noundef i32 @_Z4findiPi(i32 noundef %229, ptr noundef @p2)
          to label %231 unwind label %254

231:                                              ; preds = %228
  %232 = sext i32 %230 to i64
  %233 = getelementptr inbounds [1010 x i32], ptr @p2, i64 0, i64 %232
  store i32 %227, ptr %233, align 4, !tbaa !8
  %234 = load i32, ptr %17, align 4, !tbaa !8
  %235 = invoke noundef i32 @_Z4findiPi(i32 noundef %234, ptr noundef @p2)
          to label %236 unwind label %254

236:                                              ; preds = %231
  %237 = sext i32 %235 to i64
  %238 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %237
  %239 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %238)
          to label %240 unwind label %254

240:                                              ; preds = %236
  %241 = load i32, ptr %239, align 4, !tbaa !8
  store i32 %241, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %242 unwind label %258

242:                                              ; preds = %240
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %243 unwind label %258

243:                                              ; preds = %242
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  %244 = load i32, ptr %14, align 4, !tbaa !8
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %14, align 4, !tbaa !8
  %246 = load i32, ptr %6, align 4, !tbaa !8
  %247 = load i32, ptr %2, align 4, !tbaa !8
  %248 = icmp eq i32 %246, %247
  br i1 %248, label %253, label %249

249:                                              ; preds = %243
  %250 = load i32, ptr %7, align 4, !tbaa !8
  %251 = load i32, ptr %2, align 4, !tbaa !8
  %252 = icmp eq i32 %250, %251
  br i1 %252, label %253, label %262

253:                                              ; preds = %249, %243
  store i8 0, ptr %16, align 1, !tbaa !15
  store i32 14, ptr %18, align 4
  br label %267

254:                                              ; preds = %236, %231, %228, %221, %215, %211, %207, %202, %199, %192, %186, %183, %178, %175, %170, %167
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %20, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %21, align 4
  br label %268

258:                                              ; preds = %242, %240
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %20, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %268

262:                                              ; preds = %249
  br label %263

263:                                              ; preds = %262, %181, %173
  br label %264

264:                                              ; preds = %263
  %265 = load i32, ptr %19, align 4, !tbaa !8
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %19, align 4, !tbaa !8
  br label %157, !llvm.loop !19

267:                                              ; preds = %253, %166
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %269

268:                                              ; preds = %258, %254
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %313

269:                                              ; preds = %267
  br label %270

270:                                              ; preds = %269
  %271 = load i32, ptr %17, align 4, !tbaa !8
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %17, align 4, !tbaa !8
  br label %146, !llvm.loop !20

273:                                              ; preds = %155
  %274 = load i32, ptr %14, align 4, !tbaa !8
  %275 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %274)
          to label %276 unwind label %288

276:                                              ; preds = %273
  %277 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %275, i8 noundef signext 10)
          to label %278 unwind label %288

278:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store ptr %15, ptr %23, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %279 = load ptr, ptr %23, align 8, !tbaa !21
  %280 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %279) #8
  %281 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %280, ptr %281, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %282 = load ptr, ptr %23, align 8, !tbaa !21
  %283 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %282) #8
  %284 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %283, ptr %284, align 8
  br label %285

285:                                              ; preds = %306, %278
  %286 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  br i1 %286, label %292, label %287

287:                                              ; preds = %285
  store i32 17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %312

288:                                              ; preds = %276, %273
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %20, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %21, align 4
  br label %313

292:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %293 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %293, i64 8, i1 false)
  %294 = getelementptr inbounds %"struct.std::pair", ptr %26, i32 0, i32 0
  %295 = load i32, ptr %294, align 4, !tbaa !23
  %296 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %295)
          to label %297 unwind label %308

297:                                              ; preds = %292
  %298 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %296, i8 noundef signext 32)
          to label %299 unwind label %308

299:                                              ; preds = %297
  %300 = getelementptr inbounds %"struct.std::pair", ptr %26, i32 0, i32 1
  %301 = load i32, ptr %300, align 4, !tbaa !25
  %302 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %298, i32 noundef %301)
          to label %303 unwind label %308

303:                                              ; preds = %299
  %304 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %302, i8 noundef signext 10)
          to label %305 unwind label %308

305:                                              ; preds = %303
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %306

306:                                              ; preds = %305
  %307 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br label %285

308:                                              ; preds = %303, %299, %297, %292
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %20, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %313

312:                                              ; preds = %287
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %314

313:                                              ; preds = %308, %288, %268
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %316

314:                                              ; preds = %312, %142
  store i32 0, ptr %1, align 4
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %315 = load i32, ptr %1, align 4
  ret i32 %315

316:                                              ; preds = %313
  %317 = load ptr, ptr %20, align 8
  %318 = load i32, ptr %21, align 4
  %319 = insertvalue { ptr, i32 } poison, ptr %317, 0
  %320 = insertvalue { ptr, i32 } %319, i32 %318, 1
  resume { ptr, i32 } %320
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #3 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

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

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

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

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

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

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

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

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

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

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

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


; 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_istream" = type { ptr, i64, %"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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 }

@p1 = external dso_local global [1010 x i32], align 16
@p2 = external dso_local global [1010 x i32], align 16
@p1_s = external dso_local global [1010 x i32], align 16
@p2_s = external dso_local global [1010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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 %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %24
  %26 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %30 = load i32, ptr %1, align 4, !tbaa !8
  %.not44 = icmp slt i32 %30, 0
  br i1 %.not44, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %31 = add nuw i32 %30, 1
  %wide.trip.count = zext i32 %31 to i64
  %min.iters.check = icmp ult i32 %30, 7
  br i1 %min.iters.check, label %.lr.ph.preheader89, label %vector.ph

.lr.ph.preheader89:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 4294967288
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %32 = getelementptr inbounds [1010 x i32], ptr @p1, i64 0, i64 %index
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  store <4 x i32> %vec.ind, ptr %32, align 16, !tbaa !8
  store <4 x i32> %step.add, ptr %33, align 16, !tbaa !8
  %34 = getelementptr inbounds [1010 x i32], ptr @p2, i64 0, i64 %index
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  store <4 x i32> %vec.ind, ptr %34, align 16, !tbaa !8
  store <4 x i32> %step.add, ptr %35, align 16, !tbaa !8
  %36 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %index
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %36, align 16, !tbaa !8
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %37, align 16, !tbaa !8
  %38 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %index
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %38, align 16, !tbaa !8
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %39, align 16, !tbaa !8
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %40 = icmp eq i64 %index.next, %n.vec
  br i1 %40, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader89

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 1, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 2, ptr %5, align 4, !tbaa !8
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %.not3246 = icmp slt i32 %41, 1
  br i1 %.not3246, label %.preheader, label %.lr.ph49

.lr.ph:                                           ; preds = %.lr.ph.preheader89, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader89 ]
  %42 = getelementptr inbounds [1010 x i32], ptr @p1, i64 0, i64 %indvars.iv
  %43 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %43, ptr %42, align 4, !tbaa !8
  %44 = getelementptr inbounds [1010 x i32], ptr @p2, i64 0, i64 %indvars.iv
  store i32 %43, ptr %44, align 4, !tbaa !8
  %45 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %indvars.iv
  store i32 1, ptr %45, align 4, !tbaa !8
  %46 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %indvars.iv
  store i32 1, ptr %46, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !15

.preheader:                                       ; preds = %.lr.ph49, %._crit_edge
  %47 = phi i32 [ 1, %._crit_edge ], [ %73, %.lr.ph49 ]
  %48 = load i32, ptr %3, align 4, !tbaa !8
  %.not3350 = icmp slt i32 %48, 1
  br i1 %.not3350, label %.preheader.._crit_edge53_crit_edge, label %.lr.ph52

.preheader.._crit_edge53_crit_edge:               ; preds = %.preheader
  %.pre72 = load i32, ptr %5, align 4
  br label %._crit_edge53

.lr.ph49:                                         ; preds = %._crit_edge, %.lr.ph49
  %.02047 = phi i32 [ %74, %.lr.ph49 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %51 = load i32, ptr %7, align 4, !tbaa !8
  %52 = call noundef i32 @_Z4findiPi(i32 noundef %51, ptr noundef nonnull @p1)
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !8
  %56 = load i32, ptr %6, align 4, !tbaa !8
  %57 = call noundef i32 @_Z4findiPi(i32 noundef %56, ptr noundef nonnull @p1)
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !8
  %61 = add nsw i32 %60, %55
  store i32 %61, ptr %59, align 4, !tbaa !8
  %62 = load i32, ptr %6, align 4, !tbaa !8
  %63 = call noundef i32 @_Z4findiPi(i32 noundef %62, ptr noundef nonnull @p1)
  %64 = load i32, ptr %7, align 4, !tbaa !8
  %65 = call noundef i32 @_Z4findiPi(i32 noundef %64, ptr noundef nonnull @p1)
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1010 x i32], ptr @p1, i64 0, i64 %66
  store i32 %63, ptr %67, align 4, !tbaa !8
  %68 = load i32, ptr %6, align 4, !tbaa !8
  %69 = call noundef i32 @_Z4findiPi(i32 noundef %68, ptr noundef nonnull @p1)
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %70
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %71)
  %73 = load i32, ptr %72, align 4, !tbaa !8
  store i32 %73, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %74 = add nuw nsw i32 %.02047, 1
  %75 = load i32, ptr %2, align 4, !tbaa !8
  %.not32.not = icmp slt i32 %.02047, %75
  br i1 %.not32.not, label %.lr.ph49, label %.preheader, !llvm.loop !16

._crit_edge53.loopexit:                           ; preds = %.lr.ph52
  %.pre = load i32, ptr %4, align 4, !tbaa !8
  br label %._crit_edge53

._crit_edge53:                                    ; preds = %.preheader.._crit_edge53_crit_edge, %._crit_edge53.loopexit
  %76 = phi i32 [ %105, %._crit_edge53.loopexit ], [ %.pre72, %.preheader.._crit_edge53_crit_edge ]
  %77 = phi i32 [ %.pre, %._crit_edge53.loopexit ], [ %47, %.preheader.._crit_edge53_crit_edge ]
  %78 = load i32, ptr %1, align 4, !tbaa !8
  %79 = icmp eq i32 %77, %78
  %80 = icmp eq i32 %76, %78
  %or.cond = select i1 %79, i1 true, i1 %80
  br i1 %or.cond, label %108, label %111

.lr.ph52:                                         ; preds = %.preheader, %.lr.ph52
  %.02851 = phi i32 [ %106, %.lr.ph52 ], [ 1, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %81, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %83 = load i32, ptr %9, align 4, !tbaa !8
  %84 = call noundef i32 @_Z4findiPi(i32 noundef %83, ptr noundef nonnull @p2)
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !8
  %88 = load i32, ptr %8, align 4, !tbaa !8
  %89 = call noundef i32 @_Z4findiPi(i32 noundef %88, ptr noundef nonnull @p2)
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !8
  %93 = add nsw i32 %92, %87
  store i32 %93, ptr %91, align 4, !tbaa !8
  %94 = load i32, ptr %8, align 4, !tbaa !8
  %95 = call noundef i32 @_Z4findiPi(i32 noundef %94, ptr noundef nonnull @p2)
  %96 = load i32, ptr %9, align 4, !tbaa !8
  %97 = call noundef i32 @_Z4findiPi(i32 noundef %96, ptr noundef nonnull @p2)
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1010 x i32], ptr @p2, i64 0, i64 %98
  store i32 %95, ptr %99, align 4, !tbaa !8
  %100 = load i32, ptr %8, align 4, !tbaa !8
  %101 = call noundef i32 @_Z4findiPi(i32 noundef %100, ptr noundef nonnull @p2)
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %102
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %103)
  %105 = load i32, ptr %104, align 4, !tbaa !8
  store i32 %105, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  %106 = add nuw nsw i32 %.02851, 1
  %107 = load i32, ptr %3, align 4, !tbaa !8
  %.not33.not = icmp slt i32 %.02851, %107
  br i1 %.not33.not, label %.lr.ph52, label %._crit_edge53.loopexit, !llvm.loop !17

108:                                              ; preds = %._crit_edge53
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %109, i8 noundef signext 10)
  br label %231

111:                                              ; preds = %._crit_edge53
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 1, ptr %11, align 4, !tbaa !8
  %112 = load i32, ptr %1, align 4, !tbaa !8
  %113 = icmp sgt i32 %112, 0
  br i1 %113, label %.lr.ph65, label %._crit_edge66

._crit_edge66:                                    ; preds = %._crit_edge57, %._crit_edge57.thread, %111
  %.026.lcssa = phi i32 [ 0, %111 ], [ %189, %._crit_edge57.thread ], [ %.3, %._crit_edge57 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.026.lcssa)
          to label %209 unwind label %215

.lr.ph65:                                         ; preds = %111, %._crit_edge57
  %115 = phi i32 [ %204, %._crit_edge57 ], [ %112, %111 ]
  %116 = phi i32 [ %206, %._crit_edge57 ], [ 1, %111 ]
  %.02662 = phi i32 [ %.3, %._crit_edge57 ], [ 0, %111 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 1, ptr %12, align 4, !tbaa !8
  %117 = icmp sgt i32 %116, 1
  br i1 %117, label %.lr.ph56, label %._crit_edge57

.lr.ph56:                                         ; preds = %.lr.ph65, %199
  %118 = phi i32 [ %202, %199 ], [ %116, %.lr.ph65 ]
  %.12754 = phi i32 [ %.2, %199 ], [ %.02662, %.lr.ph65 ]
  %119 = invoke noundef i32 @_Z4findiPi(i32 noundef %118, ptr noundef nonnull @p1)
          to label %120 unwind label %195

120:                                              ; preds = %.lr.ph56
  %121 = load i32, ptr %12, align 4, !tbaa !8
  %122 = invoke noundef i32 @_Z4findiPi(i32 noundef %121, ptr noundef nonnull @p1)
          to label %123 unwind label %195

123:                                              ; preds = %120
  %.not35 = icmp eq i32 %119, %122
  br i1 %.not35, label %199, label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %11, align 4, !tbaa !8
  %126 = invoke noundef i32 @_Z4findiPi(i32 noundef %125, ptr noundef nonnull @p2)
          to label %127 unwind label %195

127:                                              ; preds = %124
  %128 = load i32, ptr %12, align 4, !tbaa !8
  %129 = invoke noundef i32 @_Z4findiPi(i32 noundef %128, ptr noundef nonnull @p2)
          to label %130 unwind label %195

130:                                              ; preds = %127
  %.not36 = icmp eq i32 %126, %129
  br i1 %.not36, label %199, label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %12, align 4, !tbaa !8
  %133 = invoke noundef i32 @_Z4findiPi(i32 noundef %132, ptr noundef nonnull @p1)
          to label %134 unwind label %195

134:                                              ; preds = %131
  %135 = sext i32 %133 to i64
  %136 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !8
  %138 = load i32, ptr %11, align 4, !tbaa !8
  %139 = invoke noundef i32 @_Z4findiPi(i32 noundef %138, ptr noundef nonnull @p1)
          to label %140 unwind label %195

140:                                              ; preds = %134
  %141 = sext i32 %139 to i64
  %142 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !8
  %144 = add nsw i32 %143, %137
  store i32 %144, ptr %142, align 4, !tbaa !8
  %145 = load i32, ptr %11, align 4, !tbaa !8
  %146 = invoke noundef i32 @_Z4findiPi(i32 noundef %145, ptr noundef nonnull @p1)
          to label %147 unwind label %195

147:                                              ; preds = %140
  %148 = load i32, ptr %12, align 4, !tbaa !8
  %149 = invoke noundef i32 @_Z4findiPi(i32 noundef %148, ptr noundef nonnull @p1)
          to label %150 unwind label %195

150:                                              ; preds = %147
  %151 = sext i32 %149 to i64
  %152 = getelementptr inbounds [1010 x i32], ptr @p1, i64 0, i64 %151
  store i32 %146, ptr %152, align 4, !tbaa !8
  %153 = load i32, ptr %11, align 4, !tbaa !8
  %154 = invoke noundef i32 @_Z4findiPi(i32 noundef %153, ptr noundef nonnull @p1)
          to label %155 unwind label %195

155:                                              ; preds = %150
  %156 = sext i32 %154 to i64
  %157 = getelementptr inbounds [1010 x i32], ptr @p1_s, i64 0, i64 %156
  %158 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %157)
  %159 = load i32, ptr %158, align 4, !tbaa !8
  store i32 %159, ptr %4, align 4, !tbaa !8
  %160 = load i32, ptr %12, align 4, !tbaa !8
  %161 = invoke noundef i32 @_Z4findiPi(i32 noundef %160, ptr noundef nonnull @p2)
          to label %162 unwind label %195

162:                                              ; preds = %155
  %163 = sext i32 %161 to i64
  %164 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !8
  %166 = load i32, ptr %11, align 4, !tbaa !8
  %167 = invoke noundef i32 @_Z4findiPi(i32 noundef %166, ptr noundef nonnull @p2)
          to label %168 unwind label %195

168:                                              ; preds = %162
  %169 = sext i32 %167 to i64
  %170 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !8
  %172 = add nsw i32 %171, %165
  store i32 %172, ptr %170, align 4, !tbaa !8
  %173 = load i32, ptr %11, align 4, !tbaa !8
  %174 = invoke noundef i32 @_Z4findiPi(i32 noundef %173, ptr noundef nonnull @p2)
          to label %175 unwind label %195

175:                                              ; preds = %168
  %176 = load i32, ptr %12, align 4, !tbaa !8
  %177 = invoke noundef i32 @_Z4findiPi(i32 noundef %176, ptr noundef nonnull @p2)
          to label %178 unwind label %195

178:                                              ; preds = %175
  %179 = sext i32 %177 to i64
  %180 = getelementptr inbounds [1010 x i32], ptr @p2, i64 0, i64 %179
  store i32 %174, ptr %180, align 4, !tbaa !8
  %181 = load i32, ptr %11, align 4, !tbaa !8
  %182 = invoke noundef i32 @_Z4findiPi(i32 noundef %181, ptr noundef nonnull @p2)
          to label %183 unwind label %195

183:                                              ; preds = %178
  %184 = sext i32 %182 to i64
  %185 = getelementptr inbounds [1010 x i32], ptr @p2_s, i64 0, i64 %184
  %186 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %185)
  %187 = load i32, ptr %186, align 4, !tbaa !8
  store i32 %187, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %188 unwind label %197

188:                                              ; preds = %183
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %189 = add nsw i32 %.12754, 1
  %190 = load i32, ptr %4, align 4, !tbaa !8
  %191 = load i32, ptr %1, align 4, !tbaa !8
  %192 = icmp eq i32 %190, %191
  %193 = load i32, ptr %5, align 4
  %194 = icmp eq i32 %193, %191
  %or.cond41 = select i1 %192, i1 true, i1 %194
  br i1 %or.cond41, label %._crit_edge57.thread, label %199

._crit_edge57.thread:                             ; preds = %188
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %._crit_edge66

195:                                              ; preds = %178, %175, %168, %162, %155, %150, %147, %140, %134, %131, %127, %124, %120, %.lr.ph56
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %208

197:                                              ; preds = %183
  %198 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %208

199:                                              ; preds = %188, %123, %130
  %.2 = phi i32 [ %.12754, %130 ], [ %.12754, %123 ], [ %189, %188 ]
  %200 = load i32, ptr %12, align 4, !tbaa !8
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %12, align 4, !tbaa !8
  %202 = load i32, ptr %11, align 4, !tbaa !8
  %203 = icmp slt i32 %201, %202
  br i1 %203, label %.lr.ph56, label %._crit_edge57.loopexitsplit, !llvm.loop !18

._crit_edge57.loopexitsplit:                      ; preds = %199
  %.pre74.pre = load i32, ptr %1, align 4, !tbaa !8
  br label %._crit_edge57

._crit_edge57:                                    ; preds = %._crit_edge57.loopexitsplit, %.lr.ph65
  %204 = phi i32 [ %115, %.lr.ph65 ], [ %.pre74.pre, %._crit_edge57.loopexitsplit ]
  %205 = phi i32 [ %116, %.lr.ph65 ], [ %202, %._crit_edge57.loopexitsplit ]
  %.3 = phi i32 [ %.02662, %.lr.ph65 ], [ %.2, %._crit_edge57.loopexitsplit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %11, align 4, !tbaa !8
  %207 = icmp slt i32 %205, %204
  br i1 %207, label %.lr.ph65, label %._crit_edge66, !llvm.loop !19

208:                                              ; preds = %197, %195
  %.pn = phi { ptr, i32 } [ %198, %197 ], [ %196, %195 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  br label %230

209:                                              ; preds = %._crit_edge66
  %210 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %114, i8 noundef signext 10)
          to label %211 unwind label %215

211:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %212 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  store ptr %212, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %213 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  store ptr %213, ptr %15, align 8
  %214 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %214, label %.lr.ph69, label %._crit_edge70

._crit_edge70:                                    ; preds = %225, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  br label %231

215:                                              ; preds = %209, %._crit_edge66
  %216 = landingpad { ptr, i32 }
          cleanup
  br label %230

.lr.ph69:                                         ; preds = %211, %225
  %217 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %.sroa.0.0.copyload = load i32, ptr %217, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %217, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4
  %218 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.0.0.copyload)
          to label %219 unwind label %228

219:                                              ; preds = %.lr.ph69
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %218, i8 noundef signext 32)
          to label %221 unwind label %228

221:                                              ; preds = %219
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %220, i32 noundef %.sroa.5.0.copyload)
          to label %223 unwind label %228

223:                                              ; preds = %221
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %222, i8 noundef signext 10)
          to label %225 unwind label %228

225:                                              ; preds = %223
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %227 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %227, label %.lr.ph69, label %._crit_edge70

228:                                              ; preds = %223, %221, %219, %.lr.ph69
  %229 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %230

230:                                              ; preds = %228, %215, %208
  %.pn.pn = phi { ptr, i32 } [ %.pn, %208 ], [ %229, %228 ], [ %216, %215 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #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 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn

231:                                              ; preds = %._crit_edge70, %108
  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 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #3 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

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

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

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

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

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

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

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

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

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

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


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