; LLVM IR from DionysiosB/CodeForces :: 0700-0799 (733C-EpidemicInMonstropolis)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<long, char>, std::allocator<std::pair<long, char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long, char>, std::allocator<std::pair<long, char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long, char>, std::allocator<std::pair<long, char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long, char>, std::allocator<std::pair<long, char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ i64, i8, [7 x i8] }>

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca i8, align 1
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca %"struct.std::pair", align 8
  %29 = alloca i64, align 8
  %30 = alloca i8, align 1
  %31 = alloca { i64, i8 }, align 8
  %32 = alloca i64, align 8
  %33 = alloca %"struct.std::pair", align 8
  %34 = alloca i64, align 8
  %35 = alloca i8, align 1
  %36 = alloca { i64, i8 }, align 8
  %37 = alloca %"struct.std::pair", align 8
  %38 = alloca i64, align 8
  %39 = alloca i8, align 1
  %40 = alloca { i64, i8 }, align 8
  %41 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  %43 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %43, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %44 unwind label %50

44:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %64, %44
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = load i64, ptr %2, align 8, !tbaa !5
  %48 = icmp slt i64 %46, %47
  br i1 %48, label %54, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %71

50:                                               ; preds = %0
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  br label %355

54:                                               ; preds = %45
  %55 = load i64, ptr %8, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %55) #6
  %57 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %56)
          to label %58 unwind label %67

58:                                               ; preds = %54
  %59 = load i64, ptr %8, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %59) #6
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = load i64, ptr %3, align 8, !tbaa !5
  %63 = add nsw i64 %62, %61
  store i64 %63, ptr %3, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %58
  %65 = load i64, ptr %8, align 8, !tbaa !5
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %8, align 8, !tbaa !5
  br label %45, !llvm.loop !9

67:                                               ; preds = %54
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %6, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %354

71:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %72 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %9)
          to label %73 unwind label %81

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  %74 = load i64, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %74, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %75 unwind label %85

75:                                               ; preds = %73
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %99, %75
  %77 = load i64, ptr %13, align 8, !tbaa !5
  %78 = load i64, ptr %9, align 8, !tbaa !5
  %79 = icmp slt i64 %77, %78
  br i1 %79, label %89, label %80

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

81:                                               ; preds = %71
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %6, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %7, align 4
  br label %353

85:                                               ; preds = %73
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %6, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %352

89:                                               ; preds = %76
  %90 = load i64, ptr %13, align 8, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %90) #6
  %92 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %91)
          to label %93 unwind label %102

93:                                               ; preds = %89
  %94 = load i64, ptr %13, align 8, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %94) #6
  %96 = load i64, ptr %95, align 8, !tbaa !5
  %97 = load i64, ptr %10, align 8, !tbaa !5
  %98 = add nsw i64 %97, %96
  store i64 %98, ptr %10, align 8, !tbaa !5
  br label %99

99:                                               ; preds = %93
  %100 = load i64, ptr %13, align 8, !tbaa !5
  %101 = add nsw i64 %100, 1
  store i64 %101, ptr %13, align 8, !tbaa !5
  br label %76, !llvm.loop !11

102:                                              ; preds = %89
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %6, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %351

106:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  call void @_ZNSt6vectorISt4pairIlcESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  %107 = load i64, ptr %3, align 8, !tbaa !5
  %108 = load i64, ptr %10, align 8, !tbaa !5
  %109 = icmp eq i64 %107, %108
  %110 = zext i1 %109 to i8
  store i8 %110, ptr %15, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store i64 0, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store i64 0, ptr %18, align 8, !tbaa !5
  br label %111

111:                                              ; preds = %305, %303, %106
  %112 = load i8, ptr %15, align 1, !tbaa !12, !range !14, !noundef !15
  %113 = trunc i8 %112 to i1
  br i1 %113, label %114, label %122

114:                                              ; preds = %111
  %115 = load i64, ptr %17, align 8, !tbaa !5
  %116 = load i64, ptr %2, align 8, !tbaa !5
  %117 = icmp slt i64 %115, %116
  br i1 %117, label %118, label %122

118:                                              ; preds = %114
  %119 = load i64, ptr %18, align 8, !tbaa !5
  %120 = load i64, ptr %9, align 8, !tbaa !5
  %121 = icmp slt i64 %119, %120
  br label %122

122:                                              ; preds = %118, %114, %111
  %123 = phi i1 [ false, %114 ], [ false, %111 ], [ %121, %118 ]
  br i1 %123, label %124, label %308

124:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %125 = load i64, ptr %18, align 8, !tbaa !5
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %18, align 8, !tbaa !5
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %125) #6
  %128 = load i64, ptr %127, align 8, !tbaa !5
  store i64 %128, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  call void @_ZNSt6vectorIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store i64 0, ptr %21, align 8, !tbaa !5
  br label %129

129:                                              ; preds = %144, %124
  %130 = load i64, ptr %17, align 8, !tbaa !5
  %131 = load i64, ptr %2, align 8, !tbaa !5
  %132 = icmp slt i64 %130, %131
  br i1 %132, label %133, label %137

133:                                              ; preds = %129
  %134 = load i64, ptr %21, align 8, !tbaa !5
  %135 = load i64, ptr %19, align 8, !tbaa !5
  %136 = icmp slt i64 %134, %135
  br label %137

137:                                              ; preds = %133, %129
  %138 = phi i1 [ false, %129 ], [ %136, %133 ]
  br i1 %138, label %139, label %152

139:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %140 = load i64, ptr %17, align 8, !tbaa !5
  %141 = add nsw i64 %140, 1
  store i64 %141, ptr %17, align 8, !tbaa !5
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %140) #6
  %143 = load i64, ptr %142, align 8, !tbaa !5
  store i64 %143, ptr %22, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %144 unwind label %148

144:                                              ; preds = %139
  %145 = load i64, ptr %22, align 8, !tbaa !5
  %146 = load i64, ptr %21, align 8, !tbaa !5
  %147 = add nsw i64 %146, %145
  store i64 %147, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %129, !llvm.loop !16

148:                                              ; preds = %139
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %6, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %307

152:                                              ; preds = %137
  %153 = load i64, ptr %21, align 8, !tbaa !5
  %154 = load i64, ptr %19, align 8, !tbaa !5
  %155 = icmp sgt i64 %153, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %152
  store i8 0, ptr %15, align 1, !tbaa !12
  store i32 9, ptr %23, align 4
  br label %303

157:                                              ; preds = %152
  %158 = load i64, ptr %16, align 8, !tbaa !5
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %16, align 8, !tbaa !5
  %160 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %161 = icmp eq i64 %160, 1
  br i1 %161, label %162, label %163

162:                                              ; preds = %157
  store i32 8, ptr %23, align 4
  br label %303, !llvm.loop !17

163:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store i64 -1, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store i64 -1, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  store i64 0, ptr %26, align 8, !tbaa !5
  br label %164

164:                                              ; preds = %213, %163
  %165 = load i64, ptr %26, align 8, !tbaa !5
  %166 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %167 = icmp ult i64 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  store i32 12, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %216

169:                                              ; preds = %164
  %170 = load i64, ptr %26, align 8, !tbaa !5
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %170) #6
  %172 = load i64, ptr %171, align 8, !tbaa !5
  %173 = load i64, ptr %24, align 8, !tbaa !5
  %174 = icmp sgt i64 %172, %173
  br i1 %174, label %175, label %212

175:                                              ; preds = %169
  %176 = load i64, ptr %26, align 8, !tbaa !5
  %177 = icmp sgt i64 %176, 0
  br i1 %177, label %178, label %192

178:                                              ; preds = %175
  %179 = load i64, ptr %26, align 8, !tbaa !5
  %180 = sub nsw i64 %179, 1
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %180) #6
  %182 = load i64, ptr %181, align 8, !tbaa !5
  %183 = load i64, ptr %26, align 8, !tbaa !5
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %183) #6
  %185 = load i64, ptr %184, align 8, !tbaa !5
  %186 = icmp slt i64 %182, %185
  br i1 %186, label %187, label %192

187:                                              ; preds = %178
  %188 = load i64, ptr %26, align 8, !tbaa !5
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %188) #6
  %190 = load i64, ptr %189, align 8, !tbaa !5
  store i64 %190, ptr %24, align 8, !tbaa !5
  %191 = load i64, ptr %26, align 8, !tbaa !5
  store i64 %191, ptr %25, align 8, !tbaa !5
  br label %192

192:                                              ; preds = %187, %178, %175
  %193 = load i64, ptr %26, align 8, !tbaa !5
  %194 = add nsw i64 %193, 1
  %195 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %196 = icmp ult i64 %194, %195
  br i1 %196, label %197, label %211

197:                                              ; preds = %192
  %198 = load i64, ptr %26, align 8, !tbaa !5
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %198) #6
  %200 = load i64, ptr %199, align 8, !tbaa !5
  %201 = load i64, ptr %26, align 8, !tbaa !5
  %202 = add nsw i64 %201, 1
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %202) #6
  %204 = load i64, ptr %203, align 8, !tbaa !5
  %205 = icmp sgt i64 %200, %204
  br i1 %205, label %206, label %211

206:                                              ; preds = %197
  %207 = load i64, ptr %26, align 8, !tbaa !5
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %207) #6
  %209 = load i64, ptr %208, align 8, !tbaa !5
  store i64 %209, ptr %24, align 8, !tbaa !5
  %210 = load i64, ptr %26, align 8, !tbaa !5
  store i64 %210, ptr %25, align 8, !tbaa !5
  br label %211

211:                                              ; preds = %206, %197, %192
  br label %212

212:                                              ; preds = %211, %169
  br label %213

213:                                              ; preds = %212
  %214 = load i64, ptr %26, align 8, !tbaa !5
  %215 = add nsw i64 %214, 1
  store i64 %215, ptr %26, align 8, !tbaa !5
  br label %164, !llvm.loop !18

216:                                              ; preds = %168
  %217 = load i64, ptr %24, align 8, !tbaa !5
  %218 = icmp slt i64 %217, 0
  br i1 %218, label %219, label %220

219:                                              ; preds = %216
  store i8 0, ptr %15, align 1, !tbaa !12
  store i32 9, ptr %23, align 4
  br label %302

220:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %221 = load i64, ptr %25, align 8, !tbaa !5
  store i64 %221, ptr %27, align 8, !tbaa !5
  %222 = load i64, ptr %25, align 8, !tbaa !5
  %223 = icmp sgt i64 %222, 0
  br i1 %223, label %224, label %247

224:                                              ; preds = %220
  %225 = load i64, ptr %25, align 8, !tbaa !5
  %226 = sub nsw i64 %225, 1
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %226) #6
  %228 = load i64, ptr %227, align 8, !tbaa !5
  %229 = load i64, ptr %25, align 8, !tbaa !5
  %230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %229) #6
  %231 = load i64, ptr %230, align 8, !tbaa !5
  %232 = icmp sle i64 %228, %231
  br i1 %232, label %233, label %247

233:                                              ; preds = %224
  %234 = load i64, ptr %25, align 8, !tbaa !5
  %235 = add nsw i64 %234, 1
  store i64 %235, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %236 = load i64, ptr %25, align 8, !tbaa !5
  %237 = load i64, ptr %16, align 8, !tbaa !5
  %238 = sub nsw i64 %237, 1
  %239 = add nsw i64 %236, %238
  store i64 %239, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #6
  store i8 82, ptr %30, align 1, !tbaa !19
  %240 = invoke { i64, i8 } @_ZSt9make_pairIlcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %241 unwind label %243

241:                                              ; preds = %233
  store { i64, i8 } %240, ptr %31, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %31, i64 9, i1 false)
  invoke void @_ZNSt6vectorISt4pairIlcESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(9) %28)
          to label %242 unwind label %243

242:                                              ; preds = %241
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  br label %247

243:                                              ; preds = %241, %233
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %6, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  br label %306

247:                                              ; preds = %242, %224, %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  store i64 0, ptr %32, align 8, !tbaa !5
  br label %248

248:                                              ; preds = %297, %247
  %249 = load i64, ptr %32, align 8, !tbaa !5
  %250 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %251 = icmp ult i64 %249, %250
  br i1 %251, label %253, label %252

252:                                              ; preds = %248
  store i32 15, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %301

253:                                              ; preds = %248
  %254 = load i64, ptr %32, align 8, !tbaa !5
  %255 = load i64, ptr %25, align 8, !tbaa !5
  %256 = icmp slt i64 %254, %255
  br i1 %256, label %257, label %271

257:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %258 = load i64, ptr %25, align 8, !tbaa !5
  %259 = load i64, ptr %32, align 8, !tbaa !5
  %260 = sub nsw i64 %258, %259
  %261 = load i64, ptr %16, align 8, !tbaa !5
  %262 = sub nsw i64 %261, 1
  %263 = add nsw i64 %260, %262
  store i64 %263, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #6
  store i8 76, ptr %35, align 1, !tbaa !19
  %264 = invoke { i64, i8 } @_ZSt9make_pairIlcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %265 unwind label %267

265:                                              ; preds = %257
  store { i64, i8 } %264, ptr %36, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %36, i64 9, i1 false)
  invoke void @_ZNSt6vectorISt4pairIlcESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(9) %33)
          to label %266 unwind label %267

266:                                              ; preds = %265
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  br label %296

267:                                              ; preds = %265, %257
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %6, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  br label %300

271:                                              ; preds = %253
  %272 = load i64, ptr %32, align 8, !tbaa !5
  %273 = load i64, ptr %25, align 8, !tbaa !5
  %274 = icmp eq i64 %272, %273
  br i1 %274, label %279, label %275

275:                                              ; preds = %271
  %276 = load i64, ptr %32, align 8, !tbaa !5
  %277 = load i64, ptr %27, align 8, !tbaa !5
  %278 = icmp eq i64 %276, %277
  br i1 %278, label %279, label %280

279:                                              ; preds = %275, %271
  br label %297

280:                                              ; preds = %275
  %281 = load i64, ptr %32, align 8, !tbaa !5
  %282 = load i64, ptr %25, align 8, !tbaa !5
  %283 = icmp sgt i64 %281, %282
  br i1 %283, label %284, label %294

284:                                              ; preds = %280
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %285 = load i64, ptr %16, align 8, !tbaa !5
  %286 = sub nsw i64 %285, 1
  store i64 %286, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #6
  store i8 82, ptr %39, align 1, !tbaa !19
  %287 = invoke { i64, i8 } @_ZSt9make_pairIlcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %288 unwind label %290

288:                                              ; preds = %284
  store { i64, i8 } %287, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %40, i64 9, i1 false)
  invoke void @_ZNSt6vectorISt4pairIlcESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(9) %37)
          to label %289 unwind label %290

289:                                              ; preds = %288
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #6
  br label %294

290:                                              ; preds = %288, %284
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %6, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #6
  br label %300

294:                                              ; preds = %289, %280
  br label %295

295:                                              ; preds = %294
  br label %296

296:                                              ; preds = %295, %266
  br label %297

297:                                              ; preds = %296, %279
  %298 = load i64, ptr %32, align 8, !tbaa !5
  %299 = add nsw i64 %298, 1
  store i64 %299, ptr %32, align 8, !tbaa !5
  br label %248, !llvm.loop !20

300:                                              ; preds = %290, %267
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %306

301:                                              ; preds = %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  store i32 0, ptr %23, align 4
  br label %302

302:                                              ; preds = %301, %219
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %303

303:                                              ; preds = %302, %162, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %304 = load i32, ptr %23, align 4
  switch i32 %304, label %361 [
    i32 0, label %305
    i32 9, label %308
    i32 8, label %111
  ]

305:                                              ; preds = %303
  br label %111, !llvm.loop !17

306:                                              ; preds = %300, %243
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %307

307:                                              ; preds = %306, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %350

308:                                              ; preds = %303, %122
  %309 = load i8, ptr %15, align 1, !tbaa !12, !range !14, !noundef !15
  %310 = trunc i8 %309 to i1
  %311 = zext i1 %310 to i64
  %312 = select i1 %310, ptr @.str.1, ptr @.str.2
  %313 = invoke i32 @puts(ptr noundef %312)
          to label %314 unwind label %323

314:                                              ; preds = %308
  %315 = load i8, ptr %15, align 1, !tbaa !12, !range !14, !noundef !15
  %316 = trunc i8 %315 to i1
  br i1 %316, label %317, label %348

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

318:                                              ; preds = %340, %317
  %319 = load i64, ptr %41, align 8, !tbaa !5
  %320 = call noundef i64 @_ZNKSt6vectorISt4pairIlcESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %321 = icmp ult i64 %319, %320
  br i1 %321, label %327, label %322

322:                                              ; preds = %318
  store i32 18, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  br label %347

323:                                              ; preds = %308
  %324 = landingpad { ptr, i32 }
          cleanup
  %325 = extractvalue { ptr, i32 } %324, 0
  store ptr %325, ptr %6, align 8
  %326 = extractvalue { ptr, i32 } %324, 1
  store i32 %326, ptr %7, align 4
  br label %350

327:                                              ; preds = %318
  %328 = load i64, ptr %41, align 8, !tbaa !5
  %329 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt6vectorISt4pairIlcESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %328) #6
  %330 = getelementptr inbounds %"struct.std::pair", ptr %329, i32 0, i32 0
  %331 = load i64, ptr %330, align 8, !tbaa !21
  %332 = add nsw i64 1, %331
  %333 = load i64, ptr %41, align 8, !tbaa !5
  %334 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt6vectorISt4pairIlcESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %333) #6
  %335 = getelementptr inbounds %"struct.std::pair", ptr %334, i32 0, i32 1
  %336 = load i8, ptr %335, align 8, !tbaa !23
  %337 = sext i8 %336 to i32
  %338 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %332, i32 noundef %337)
          to label %339 unwind label %343

339:                                              ; preds = %327
  br label %340

340:                                              ; preds = %339
  %341 = load i64, ptr %41, align 8, !tbaa !5
  %342 = add nsw i64 %341, 1
  store i64 %342, ptr %41, align 8, !tbaa !5
  br label %318, !llvm.loop !24

343:                                              ; preds = %327
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %6, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  br label %350

347:                                              ; preds = %322
  br label %348

348:                                              ; preds = %347, %314
  store i32 0, ptr %1, align 4
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @_ZNSt6vectorISt4pairIlcESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %349 = load i32, ptr %1, align 4
  ret i32 %349

350:                                              ; preds = %343, %323, %307
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @_ZNSt6vectorISt4pairIlcESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %351

351:                                              ; preds = %350, %102
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %352

352:                                              ; preds = %351, %85
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %353

353:                                              ; preds = %352, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %354

354:                                              ; preds = %353, %67
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %355

355:                                              ; preds = %354, %50
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %356

356:                                              ; preds = %355
  %357 = load ptr, ptr %6, align 8
  %358 = load i32, ptr %7, align 4
  %359 = insertvalue { ptr, i32 } poison, ptr %357, 0
  %360 = insertvalue { ptr, i32 } %359, i32 %358, 1
  resume { ptr, i32 } %360

361:                                              ; preds = %303
  unreachable
}

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

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

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

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

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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

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

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

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

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

; 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) #5

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

declare i32 @puts(ptr noundef) #2

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

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

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

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<long, char>, std::allocator<std::pair<long, char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long, char>, std::allocator<std::pair<long, char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long, char>, std::allocator<std::pair<long, char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long, char>, std::allocator<std::pair<long, char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ i64, i8, [7 x i8] }>

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector.0", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i64, align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca i64, align 8
  %18 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  %20 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %21 unwind label %26

21:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = icmp sgt i64 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %21
  %.077.lcssa = phi i64 [ 0, %21 ], [ %32, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  %25 = load i64, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %36 unwind label %44

26:                                               ; preds = %0
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %189

.lr.ph:                                           ; preds = %21, %.lr.ph
  %.077135 = phi i64 [ %32, %.lr.ph ], [ 0, %21 ]
  %.085134 = phi i64 [ %33, %.lr.ph ], [ 0, %21 ]
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.085134) #5
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %28)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.085134) #5
  %31 = load i64, ptr %30, align 8, !tbaa !5
  %32 = add nsw i64 %31, %.077135
  %33 = add nuw nsw i64 %.085134, 1
  %34 = load i64, ptr %1, align 8, !tbaa !5
  %35 = icmp slt i64 %33, %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !9

36:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  %37 = load i64, ptr %4, align 8, !tbaa !5
  %38 = icmp sgt i64 %37, 0
  br i1 %38, label %.lr.ph139, label %._crit_edge140

._crit_edge140:                                   ; preds = %.lr.ph139, %36
  %.086.lcssa = phi i64 [ 0, %36 ], [ %50, %.lr.ph139 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorISt4pairIlcESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %39 = icmp eq i64 %.077.lcssa, %.086.lcssa
  %40 = load i64, ptr %1, align 8
  %41 = icmp sgt i64 %40, 0
  %or.cond159 = select i1 %39, i1 %41, i1 false
  %42 = load i64, ptr %4, align 8
  %43 = icmp sgt i64 %42, 0
  %or.cond118160 = select i1 %or.cond159, i1 %43, i1 false
  br i1 %or.cond118160, label %.lr.ph165, label %.critedge

.lr.ph165:                                        ; preds = %._crit_edge140
  %.sroa.218.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  %.sroa.27.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  br label %54

44:                                               ; preds = %._crit_edge
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  br label %188

.lr.ph139:                                        ; preds = %36, %.lr.ph139
  %.086137 = phi i64 [ %50, %.lr.ph139 ], [ 0, %36 ]
  %.098136 = phi i64 [ %51, %.lr.ph139 ], [ 0, %36 ]
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.098136) #5
  %47 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %46)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.098136) #5
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %50 = add nsw i64 %49, %.086137
  %51 = add nuw nsw i64 %.098136, 1
  %52 = load i64, ptr %4, align 8, !tbaa !5
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %.lr.ph139, label %._crit_edge140, !llvm.loop !11

54:                                               ; preds = %.lr.ph165, %.loopexit130
  %.099163 = phi i64 [ 0, %.lr.ph165 ], [ %55, %.loopexit130 ]
  %.0100162 = phi i64 [ 0, %.lr.ph165 ], [ %.1101.lcssa, %.loopexit130 ]
  %55 = add nuw nsw i64 %.099163, 1
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.099163) #5
  %57 = load i64, ptr %56, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %58 = load i64, ptr %1, align 8, !tbaa !5
  %59 = icmp slt i64 %.0100162, %58
  %60 = icmp sgt i64 %57, 0
  %61 = select i1 %59, i1 %60, i1 false
  br i1 %61, label %.lr.ph145, label %._crit_edge146

.lr.ph145:                                        ; preds = %54, %64
  %.097143 = phi i64 [ %67, %64 ], [ 0, %54 ]
  %.1101142 = phi i64 [ %65, %64 ], [ %.0100162, %54 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.1101142) #5
  %63 = load i64, ptr %62, align 8, !tbaa !5
  store i64 %63, ptr %9, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %64 unwind label %72

64:                                               ; preds = %.lr.ph145
  %65 = add nsw i64 %.1101142, 1
  %66 = load i64, ptr %9, align 8, !tbaa !5
  %67 = add nsw i64 %66, %.097143
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  %68 = load i64, ptr %1, align 8, !tbaa !5
  %69 = icmp slt i64 %65, %68
  %70 = icmp slt i64 %67, %57
  %71 = select i1 %69, i1 %70, i1 false
  br i1 %71, label %.lr.ph145, label %._crit_edge146, !llvm.loop !12

72:                                               ; preds = %.lr.ph145
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %173

._crit_edge146:                                   ; preds = %64, %54
  %.1101.lcssa = phi i64 [ %.0100162, %54 ], [ %65, %64 ]
  %.097.lcssa = phi i64 [ 0, %54 ], [ %67, %64 ]
  %74 = icmp sgt i64 %.097.lcssa, %57
  br i1 %74, label %.critedge.thread, label %75

75:                                               ; preds = %._crit_edge146
  %76 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %77 = icmp eq i64 %76, 1
  br i1 %77, label %.loopexit130, label %.preheader131, !llvm.loop !13

.preheader131:                                    ; preds = %75
  %78 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %.not168 = icmp eq i64 %78, 0
  br i1 %.not168, label %.critedge.thread, label %.lr.ph152.preheader

.lr.ph152.preheader:                              ; preds = %.preheader131
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #5
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = icmp sgt i64 %80, -1
  br i1 %81, label %82, label %94

82:                                               ; preds = %.lr.ph152.preheader
  %83 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %84 = icmp ugt i64 %83, 1
  br i1 %84, label %85, label %94

85:                                               ; preds = %82
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #5
  %87 = load i64, ptr %86, align 8, !tbaa !5
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 1) #5
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = icmp sgt i64 %87, %89
  br i1 %90, label %91, label %94

91:                                               ; preds = %85
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #5
  %93 = load i64, ptr %92, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %91, %85, %82, %.lr.ph152.preheader
  %.294.peel = phi i64 [ %93, %91 ], [ -1, %85 ], [ -1, %82 ], [ -1, %.lr.ph152.preheader ]
  %.291.peel = phi i64 [ 0, %91 ], [ -1, %85 ], [ -1, %82 ], [ -1, %.lr.ph152.preheader ]
  %95 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %96 = icmp ugt i64 %95, 1
  br i1 %96, label %.lr.ph152, label %._crit_edge153

._crit_edge153:                                   ; preds = %124, %94
  %.092.lcssa = phi i64 [ %.294.peel, %94 ], [ %.294, %124 ]
  %.089.lcssa = phi i64 [ %.291.peel, %94 ], [ %.291, %124 ]
  %97 = icmp slt i64 %.092.lcssa, 0
  br i1 %97, label %.critedge.thread, label %127

.lr.ph152:                                        ; preds = %94, %124
  %.088151 = phi i64 [ %.pre-phi, %124 ], [ 1, %94 ]
  %.089150 = phi i64 [ %.291, %124 ], [ %.291.peel, %94 ]
  %.092149 = phi i64 [ %.294, %124 ], [ %.294.peel, %94 ]
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.088151) #5
  %99 = load i64, ptr %98, align 8, !tbaa !5
  %100 = icmp sgt i64 %99, %.092149
  br i1 %100, label %101, label %.lr.ph152._crit_edge

.lr.ph152._crit_edge:                             ; preds = %.lr.ph152
  %.pre = add nuw nsw i64 %.088151, 1
  br label %124

101:                                              ; preds = %.lr.ph152
  %102 = add nsw i64 %.088151, -1
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %102) #5
  %104 = load i64, ptr %103, align 8, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.088151) #5
  %106 = load i64, ptr %105, align 8, !tbaa !5
  %107 = icmp slt i64 %104, %106
  br i1 %107, label %108, label %111

108:                                              ; preds = %101
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.088151) #5
  %110 = load i64, ptr %109, align 8, !tbaa !5
  br label %111

111:                                              ; preds = %108, %101
  %.193 = phi i64 [ %110, %108 ], [ %.092149, %101 ]
  %.190 = phi i64 [ %.088151, %108 ], [ %.089150, %101 ]
  %112 = add nuw nsw i64 %.088151, 1
  %113 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %114 = icmp ult i64 %112, %113
  br i1 %114, label %115, label %124

115:                                              ; preds = %111
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.088151) #5
  %117 = load i64, ptr %116, align 8, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %112) #5
  %119 = load i64, ptr %118, align 8, !tbaa !5
  %120 = icmp sgt i64 %117, %119
  br i1 %120, label %121, label %124

121:                                              ; preds = %115
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.088151) #5
  %123 = load i64, ptr %122, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %.lr.ph152._crit_edge, %121, %115, %111
  %.pre-phi = phi i64 [ %.pre, %.lr.ph152._crit_edge ], [ %112, %121 ], [ %112, %115 ], [ %112, %111 ]
  %.294 = phi i64 [ %.092149, %.lr.ph152._crit_edge ], [ %123, %121 ], [ %.193, %115 ], [ %.193, %111 ]
  %.291 = phi i64 [ %.089150, %.lr.ph152._crit_edge ], [ %.088151, %121 ], [ %.190, %115 ], [ %.190, %111 ]
  %125 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %126 = icmp ult i64 %.pre-phi, %125
  br i1 %126, label %.lr.ph152, label %._crit_edge153, !llvm.loop !14

127:                                              ; preds = %._crit_edge153
  %128 = icmp sgt i64 %.089.lcssa, 0
  br i1 %128, label %129, label %143

129:                                              ; preds = %127
  %130 = add nsw i64 %.089.lcssa, -1
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %130) #5
  %132 = load i64, ptr %131, align 8, !tbaa !5
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.089.lcssa) #5
  %134 = load i64, ptr %133, align 8, !tbaa !5
  %.not = icmp sgt i64 %132, %134
  br i1 %.not, label %143, label %135

135:                                              ; preds = %129
  %136 = add nuw nsw i64 %.089.lcssa, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %137 = add nuw nsw i64 %.089.lcssa, %.099163
  store i64 %137, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  store i8 82, ptr %12, align 1, !tbaa !16
  %138 = invoke { i64, i8 } @_ZSt9make_pairIlcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %139 unwind label %141

139:                                              ; preds = %135
  %.fca.0.extract15 = extractvalue { i64, i8 } %138, 0
  %.fca.1.extract16 = extractvalue { i64, i8 } %138, 1
  store i64 %.fca.0.extract15, ptr %10, align 8
  store i8 %.fca.1.extract16, ptr %.sroa.218.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIlcESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(9) %10)
          to label %140 unwind label %141

140:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %143

141:                                              ; preds = %139, %135
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %173

143:                                              ; preds = %140, %129, %127
  %.087 = phi i64 [ %136, %140 ], [ %.089.lcssa, %129 ], [ %.089.lcssa, %127 ]
  %144 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %.not169 = icmp eq i64 %144, 0
  br i1 %.not169, label %.loopexit130, label %.lr.ph158

.lr.ph158:                                        ; preds = %143
  %145 = add i64 %.089.lcssa, %.099163
  br label %146

146:                                              ; preds = %.lr.ph158, %164
  %.084156 = phi i64 [ 0, %.lr.ph158 ], [ %165, %164 ]
  %147 = icmp slt i64 %.084156, %.089.lcssa
  br i1 %147, label %148, label %155

148:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %149 = sub i64 %145, %.084156
  store i64 %149, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #5
  store i8 76, ptr %15, align 1, !tbaa !16
  %150 = invoke { i64, i8 } @_ZSt9make_pairIlcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %151 unwind label %153

151:                                              ; preds = %148
  %.fca.0.extract4 = extractvalue { i64, i8 } %150, 0
  %.fca.1.extract5 = extractvalue { i64, i8 } %150, 1
  store i64 %.fca.0.extract4, ptr %13, align 8
  store i8 %.fca.1.extract5, ptr %.sroa.27.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIlcESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(9) %13)
          to label %152 unwind label %153

152:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %164

153:                                              ; preds = %151, %148
  %154 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %173

155:                                              ; preds = %146
  %156 = icmp ne i64 %.084156, %.087
  %157 = icmp sgt i64 %.084156, %.089.lcssa
  %or.cond120 = select i1 %157, i1 %156, i1 false
  br i1 %or.cond120, label %158, label %164

158:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  store i64 %.099163, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #5
  store i8 82, ptr %18, align 1, !tbaa !16
  %159 = invoke { i64, i8 } @_ZSt9make_pairIlcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %160 unwind label %162

160:                                              ; preds = %158
  %.fca.0.extract = extractvalue { i64, i8 } %159, 0
  %.fca.1.extract = extractvalue { i64, i8 } %159, 1
  store i64 %.fca.0.extract, ptr %16, align 8
  store i8 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIlcESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(9) %16)
          to label %161 unwind label %162

161:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  br label %164

162:                                              ; preds = %160, %158
  %163 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  br label %173

164:                                              ; preds = %152, %161, %155
  %165 = add nuw nsw i64 %.084156, 1
  %166 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %167 = icmp ult i64 %165, %166
  br i1 %167, label %146, label %.loopexit130, !llvm.loop !17

.critedge.thread:                                 ; preds = %.preheader131, %._crit_edge153, %._crit_edge146
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  %168 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.loopexit

.loopexit130:                                     ; preds = %164, %143, %75
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  %169 = load i64, ptr %1, align 8
  %170 = icmp slt i64 %.1101.lcssa, %169
  %171 = load i64, ptr %4, align 8
  %172 = icmp slt i64 %55, %171
  %or.cond118 = select i1 %170, i1 %172, i1 false
  br i1 %or.cond118, label %54, label %.critedge

173:                                              ; preds = %141, %162, %153, %72
  %.pn112 = phi { ptr, i32 } [ %73, %72 ], [ %142, %141 ], [ %154, %153 ], [ %163, %162 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorISt4pairIlcESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %188

.critedge:                                        ; preds = %.loopexit130, %._crit_edge140
  %174 = select i1 %39, ptr @.str.1, ptr @.str.2
  %175 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %174)
  br i1 %39, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.critedge
  %176 = call noundef i64 @_ZNKSt6vectorISt4pairIlcESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %.not170 = icmp eq i64 %176, 0
  br i1 %.not170, label %.loopexit, label %.lr.ph167

.lr.ph167:                                        ; preds = %.preheader, %.lr.ph167
  %.0166 = phi i64 [ %185, %.lr.ph167 ], [ 0, %.preheader ]
  %177 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt6vectorISt4pairIlcESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.0166) #5
  %178 = load i64, ptr %177, align 8, !tbaa !18
  %179 = add nsw i64 %178, 1
  %180 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt6vectorISt4pairIlcESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.0166) #5
  %181 = getelementptr inbounds i8, ptr %180, i64 8
  %182 = load i8, ptr %181, align 8, !tbaa !20
  %183 = sext i8 %182 to i32
  %184 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %179, i32 noundef %183)
  %185 = add nuw nsw i64 %.0166, 1
  %186 = call noundef i64 @_ZNKSt6vectorISt4pairIlcESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %187 = icmp ult i64 %185, %186
  br i1 %187, label %.lr.ph167, label %.loopexit, !llvm.loop !21

.loopexit:                                        ; preds = %.lr.ph167, %.preheader, %.critedge.thread, %.critedge
  call void @_ZNSt6vectorISt4pairIlcESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

188:                                              ; preds = %173, %44
  %.pn112.pn = phi { ptr, i32 } [ %.pn112, %173 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br label %189

189:                                              ; preds = %188, %26
  %.pn112.pn.pn = phi { ptr, i32 } [ %.pn112.pn, %188 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn112.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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !15}
!15 = !{!"llvm.loop.peeled.count", i32 1}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !10}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt4pairIlcE", !6, i64 0, !7, i64 8}
!20 = !{!19, !7, i64 8}
!21 = distinct !{!21, !10}


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