; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2018.02 (teleport)

; 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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i8, align 1
  %30 = alloca i64, align 8
  %31 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %32 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %33 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %34 = getelementptr i8, ptr %33, i64 -24
  %35 = load i64, ptr %34, align 8
  %36 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %35
  %37 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %36, ptr noundef null)
  %38 = load ptr, ptr @stdin, align 8, !tbaa !8
  %39 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %38)
  %40 = load ptr, ptr @stdout, align 8, !tbaa !8
  %41 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %40)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %42 = 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)
  %43 = load i32, ptr %2, align 4, !tbaa !11
  %44 = zext i32 %43 to i64
  %45 = call ptr @llvm.stacksave.p0()
  store ptr %45, ptr %3, align 8
  %46 = alloca i64, i64 %44, align 16
  store i64 %44, ptr %4, align 8
  %47 = load i32, ptr %2, align 4, !tbaa !11
  %48 = zext i32 %47 to i64
  %49 = alloca i64, i64 %48, align 16
  store i64 %48, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %50

50:                                               ; preds = %232, %0
  %51 = load i32, ptr %8, align 4, !tbaa !11
  %52 = load i32, ptr %2, align 4, !tbaa !11
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %50
  %56 = load i32, ptr %8, align 4, !tbaa !11
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i64, ptr %46, i64 %57
  %59 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %58)
          to label %60 unwind label %99

60:                                               ; preds = %55
  %61 = load i32, ptr %8, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i64, ptr %49, i64 %62
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 8 dereferenceable(8) %63)
          to label %65 unwind label %99

65:                                               ; preds = %60
  %66 = load i32, ptr %8, align 4, !tbaa !11
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i64, ptr %46, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !13
  %70 = icmp eq i64 %69, 0
  br i1 %70, label %87, label %71

71:                                               ; preds = %65
  %72 = load i32, ptr %8, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds i64, ptr %46, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !13
  %76 = invoke noundef zeroext i1 @_ZSt7signbitIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEbE6__typeES2_(i64 noundef %75)
          to label %77 unwind label %99

77:                                               ; preds = %71
  %78 = zext i1 %76 to i32
  %79 = load i32, ptr %8, align 4, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i64, ptr %49, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !13
  %83 = invoke noundef zeroext i1 @_ZSt7signbitIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEbE6__typeES2_(i64 noundef %82)
          to label %84 unwind label %99

84:                                               ; preds = %77
  %85 = zext i1 %83 to i32
  %86 = icmp ne i32 %78, %85
  br i1 %86, label %87, label %111

87:                                               ; preds = %84, %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %88 = load i32, ptr %8, align 4, !tbaa !11
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i64, ptr %49, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !13
  %92 = mul nsw i64 %91, 2
  store i64 %92, ptr %11, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %93 unwind label %103

93:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 0, ptr %12, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %94 unwind label %107

94:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  %95 = load i32, ptr %8, align 4, !tbaa !11
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i64, ptr %49, i64 %96
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %97)
          to label %98 unwind label %99

98:                                               ; preds = %94
  br label %231

99:                                               ; preds = %94, %77, %71, %60, %55
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %9, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %10, align 4
  br label %235

103:                                              ; preds = %87
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %9, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %235

107:                                              ; preds = %93
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %9, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %235

111:                                              ; preds = %84
  %112 = load i32, ptr %8, align 4, !tbaa !11
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i64, ptr %49, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !13
  %116 = icmp slt i64 %115, 0
  br i1 %116, label %117, label %170

117:                                              ; preds = %111
  %118 = load i32, ptr %8, align 4, !tbaa !11
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i64, ptr %49, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !13
  %122 = load i32, ptr %8, align 4, !tbaa !11
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i64, ptr %46, i64 %123
  %125 = load i64, ptr %124, align 8, !tbaa !13
  %126 = mul nsw i64 2, %125
  %127 = icmp slt i64 %121, %126
  br i1 %127, label %128, label %170

128:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %129 = load i32, ptr %8, align 4, !tbaa !11
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i64, ptr %49, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !13
  %133 = load i32, ptr %8, align 4, !tbaa !11
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i64, ptr %46, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !13
  %137 = mul nsw i64 %136, 2
  %138 = sub nsw i64 %132, %137
  store i64 %138, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %139 = load i32, ptr %8, align 4, !tbaa !11
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i64, ptr %49, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !13
  %143 = load i64, ptr %13, align 8, !tbaa !13
  %144 = add nsw i64 %142, %143
  store i64 %144, ptr %14, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %145 unwind label %157

145:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %146 = load i32, ptr %8, align 4, !tbaa !11
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i64, ptr %49, i64 %147
  %149 = load i64, ptr %148, align 8, !tbaa !13
  %150 = load i64, ptr %13, align 8, !tbaa !13
  %151 = sub nsw i64 %149, %150
  store i64 %151, ptr %15, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %152 unwind label %161

152:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %153 = load i32, ptr %8, align 4, !tbaa !11
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds i64, ptr %49, i64 %154
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %155)
          to label %156 unwind label %165

156:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %230

157:                                              ; preds = %128
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %9, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %169

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

165:                                              ; preds = %152
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %9, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %10, align 4
  br label %169

169:                                              ; preds = %165, %161, %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %235

170:                                              ; preds = %117, %111
  %171 = load i32, ptr %8, align 4, !tbaa !11
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i64, ptr %49, i64 %172
  %174 = load i64, ptr %173, align 8, !tbaa !13
  %175 = icmp sgt i64 %174, 0
  br i1 %175, label %176, label %229

176:                                              ; preds = %170
  %177 = load i32, ptr %8, align 4, !tbaa !11
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds i64, ptr %49, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !13
  %181 = load i32, ptr %8, align 4, !tbaa !11
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i64, ptr %46, i64 %182
  %184 = load i64, ptr %183, align 8, !tbaa !13
  %185 = mul nsw i64 2, %184
  %186 = icmp sgt i64 %180, %185
  br i1 %186, label %187, label %229

187:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %188 = load i32, ptr %8, align 4, !tbaa !11
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i64, ptr %49, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !13
  %192 = load i32, ptr %8, align 4, !tbaa !11
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i64, ptr %46, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !13
  %196 = mul nsw i64 %195, 2
  %197 = sub nsw i64 %191, %196
  store i64 %197, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %198 = load i32, ptr %8, align 4, !tbaa !11
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds i64, ptr %49, i64 %199
  %201 = load i64, ptr %200, align 8, !tbaa !13
  %202 = load i64, ptr %16, align 8, !tbaa !13
  %203 = add nsw i64 %201, %202
  store i64 %203, ptr %17, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %204 unwind label %216

204:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %205 = load i32, ptr %8, align 4, !tbaa !11
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds i64, ptr %49, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !13
  %209 = load i64, ptr %16, align 8, !tbaa !13
  %210 = sub nsw i64 %208, %209
  store i64 %210, ptr %18, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %211 unwind label %220

211:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  %212 = load i32, ptr %8, align 4, !tbaa !11
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds i64, ptr %49, i64 %213
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %214)
          to label %215 unwind label %224

215:                                              ; preds = %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %229

216:                                              ; preds = %187
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %9, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %228

220:                                              ; preds = %204
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %9, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %228

224:                                              ; preds = %211
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %9, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %10, align 4
  br label %228

228:                                              ; preds = %224, %220, %216
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %235

229:                                              ; preds = %215, %176, %170
  br label %230

230:                                              ; preds = %229, %156
  br label %231

231:                                              ; preds = %230, %98
  br label %232

232:                                              ; preds = %231
  %233 = load i32, ptr %8, align 4, !tbaa !11
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %8, align 4, !tbaa !11
  br label %50, !llvm.loop !15

235:                                              ; preds = %228, %169, %107, %103, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %388

236:                                              ; preds = %54
  %237 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %238 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %237, ptr %238, align 8
  %239 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %240 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %239, ptr %240, align 8
  %241 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  %242 = load ptr, ptr %241, align 8
  %243 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEEvT_S7_(ptr %242, ptr %244)
          to label %245 unwind label %276

245:                                              ; preds = %236
  %246 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %247 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %246, ptr %247, align 8
  %248 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %249 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %248, ptr %249, align 8
  %250 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8
  %252 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %253 = load ptr, ptr %252, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEEvT_S7_(ptr %251, ptr %253)
          to label %254 unwind label %276

254:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store i64 0, ptr %23, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store i64 0, ptr %24, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  store i64 0, ptr %25, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  store i64 0, ptr %26, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  store i64 0, ptr %27, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  store i64 0, ptr %28, align 8, !tbaa !13
  br label %255

255:                                              ; preds = %344, %254
  %256 = load i64, ptr %24, align 8, !tbaa !13
  %257 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %258 = trunc i64 %257 to i32
  %259 = sext i32 %258 to i64
  %260 = icmp slt i64 %256, %259
  br i1 %260, label %267, label %261

261:                                              ; preds = %255
  %262 = load i64, ptr %25, align 8, !tbaa !13
  %263 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %264 = trunc i64 %263 to i32
  %265 = sext i32 %264 to i64
  %266 = icmp slt i64 %262, %265
  br label %267

267:                                              ; preds = %261, %255
  %268 = phi i1 [ true, %255 ], [ %266, %261 ]
  br i1 %268, label %269, label %345

269:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #8
  store i8 0, ptr %29, align 1, !tbaa !17
  %270 = load i64, ptr %24, align 8, !tbaa !13
  %271 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %272 = trunc i64 %271 to i32
  %273 = sext i32 %272 to i64
  %274 = icmp sge i64 %270, %273
  br i1 %274, label %275, label %280

275:                                              ; preds = %269
  store i8 0, ptr %29, align 1, !tbaa !17
  br label %297

276:                                              ; preds = %245, %236
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %9, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %10, align 4
  br label %388

280:                                              ; preds = %269
  %281 = load i64, ptr %25, align 8, !tbaa !13
  %282 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %283 = trunc i64 %282 to i32
  %284 = sext i32 %283 to i64
  %285 = icmp sge i64 %281, %284
  br i1 %285, label %286, label %287

286:                                              ; preds = %280
  store i8 1, ptr %29, align 1, !tbaa !17
  br label %296

287:                                              ; preds = %280
  %288 = load i64, ptr %24, align 8, !tbaa !13
  %289 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %288) #8
  %290 = load i64, ptr %289, align 8, !tbaa !13
  %291 = load i64, ptr %25, align 8, !tbaa !13
  %292 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %291) #8
  %293 = load i64, ptr %292, align 8, !tbaa !13
  %294 = icmp sle i64 %290, %293
  %295 = zext i1 %294 to i8
  store i8 %295, ptr %29, align 1, !tbaa !17
  br label %296

296:                                              ; preds = %287, %286
  br label %297

297:                                              ; preds = %296, %275
  %298 = load i8, ptr %29, align 1, !tbaa !17, !range !19, !noundef !20
  %299 = trunc i8 %298 to i1
  br i1 %299, label %300, label %324

300:                                              ; preds = %297
  %301 = load i64, ptr %23, align 8, !tbaa !13
  %302 = load i64, ptr %24, align 8, !tbaa !13
  %303 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %302) #8
  %304 = load i64, ptr %303, align 8, !tbaa !13
  %305 = load i64, ptr %26, align 8, !tbaa !13
  %306 = sub nsw i64 %304, %305
  %307 = mul nsw i64 %301, %306
  %308 = load i64, ptr %27, align 8, !tbaa !13
  %309 = add nsw i64 %308, %307
  store i64 %309, ptr %27, align 8, !tbaa !13
  %310 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %311 unwind label %320

311:                                              ; preds = %300
  %312 = load i64, ptr %310, align 8, !tbaa !13
  store i64 %312, ptr %28, align 8, !tbaa !13
  %313 = load i64, ptr %24, align 8, !tbaa !13
  %314 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %313) #8
  %315 = load i64, ptr %314, align 8, !tbaa !13
  store i64 %315, ptr %26, align 8, !tbaa !13
  %316 = load i64, ptr %23, align 8, !tbaa !13
  %317 = add nsw i64 %316, 1
  store i64 %317, ptr %23, align 8, !tbaa !13
  %318 = load i64, ptr %24, align 8, !tbaa !13
  %319 = add nsw i64 %318, 1
  store i64 %319, ptr %24, align 8, !tbaa !13
  br label %344

320:                                              ; preds = %324, %300
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %9, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  br label %387

324:                                              ; preds = %297
  %325 = load i64, ptr %23, align 8, !tbaa !13
  %326 = load i64, ptr %25, align 8, !tbaa !13
  %327 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %326) #8
  %328 = load i64, ptr %327, align 8, !tbaa !13
  %329 = load i64, ptr %26, align 8, !tbaa !13
  %330 = sub nsw i64 %328, %329
  %331 = mul nsw i64 %325, %330
  %332 = load i64, ptr %27, align 8, !tbaa !13
  %333 = add nsw i64 %332, %331
  store i64 %333, ptr %27, align 8, !tbaa !13
  %334 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %335 unwind label %320

335:                                              ; preds = %324
  %336 = load i64, ptr %334, align 8, !tbaa !13
  store i64 %336, ptr %28, align 8, !tbaa !13
  %337 = load i64, ptr %25, align 8, !tbaa !13
  %338 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %337) #8
  %339 = load i64, ptr %338, align 8, !tbaa !13
  store i64 %339, ptr %26, align 8, !tbaa !13
  %340 = load i64, ptr %23, align 8, !tbaa !13
  %341 = sub nsw i64 %340, 2
  store i64 %341, ptr %23, align 8, !tbaa !13
  %342 = load i64, ptr %25, align 8, !tbaa !13
  %343 = add nsw i64 %342, 1
  store i64 %343, ptr %25, align 8, !tbaa !13
  br label %344

344:                                              ; preds = %335, %311
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  br label %255, !llvm.loop !21

345:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  store i64 0, ptr %30, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !11
  br label %346

346:                                              ; preds = %365, %345
  %347 = load i32, ptr %31, align 4, !tbaa !11
  %348 = load i32, ptr %2, align 4, !tbaa !11
  %349 = icmp slt i32 %347, %348
  br i1 %349, label %351, label %350

350:                                              ; preds = %346
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %372

351:                                              ; preds = %346
  %352 = load i32, ptr %31, align 4, !tbaa !11
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds i64, ptr %46, i64 %353
  %355 = load i64, ptr %354, align 8, !tbaa !13
  %356 = load i32, ptr %31, align 4, !tbaa !11
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds i64, ptr %49, i64 %357
  %359 = load i64, ptr %358, align 8, !tbaa !13
  %360 = sub nsw i64 %355, %359
  %361 = invoke noundef i64 @_ZSt3absx(i64 noundef %360)
          to label %362 unwind label %368

362:                                              ; preds = %351
  %363 = load i64, ptr %30, align 8, !tbaa !13
  %364 = add nsw i64 %363, %361
  store i64 %364, ptr %30, align 8, !tbaa !13
  br label %365

365:                                              ; preds = %362
  %366 = load i32, ptr %31, align 4, !tbaa !11
  %367 = add nsw i32 %366, 1
  store i32 %367, ptr %31, align 4, !tbaa !11
  br label %346, !llvm.loop !22

368:                                              ; preds = %351
  %369 = landingpad { ptr, i32 }
          cleanup
  %370 = extractvalue { ptr, i32 } %369, 0
  store ptr %370, ptr %9, align 8
  %371 = extractvalue { ptr, i32 } %369, 1
  store i32 %371, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %386

372:                                              ; preds = %350
  %373 = load i64, ptr %30, align 8, !tbaa !13
  %374 = load i64, ptr %28, align 8, !tbaa !13
  %375 = sub nsw i64 %373, %374
  %376 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %375)
          to label %377 unwind label %382

377:                                              ; preds = %372
  %378 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %376, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %379 unwind label %382

379:                                              ; preds = %377
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  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
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #8
  %380 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %380)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %381 = load i32, ptr %1, align 4
  ret i32 %381

382:                                              ; preds = %377, %372
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %9, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %10, align 4
  br label %386

386:                                              ; preds = %382, %368
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %387

387:                                              ; preds = %386, %320
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  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 %388

388:                                              ; preds = %387, %276, %235
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %389

389:                                              ; preds = %388
  %390 = load ptr, ptr %9, align 8
  %391 = load i32, ptr %10, align 4
  %392 = insertvalue { ptr, i32 } poison, ptr %390, 0
  %393 = insertvalue { ptr, i32 } %392, i32 %391, 1
  resume { ptr, i32 } %393
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt7signbitIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEbE6__typeES2_(i64 noundef) #2

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #5 align 2

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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


; 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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

._crit_edge:                                      ; preds = %.thread, %0
  %32 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %33 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEEvT_S7_(ptr %32, ptr %33)
          to label %99 unwind label %115

.lr.ph:                                           ; preds = %0, %.thread
  %indvars.iv = phi i64 [ %indvars.iv.next, %.thread ], [ 0, %0 ]
  %34 = getelementptr inbounds i64, ptr %26, i64 %indvars.iv
  %35 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %36 unwind label %52

36:                                               ; preds = %.lr.ph
  %37 = getelementptr inbounds i64, ptr %29, i64 %indvars.iv
  %38 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %39 unwind label %52

39:                                               ; preds = %36
  %40 = load i64, ptr %34, align 8, !tbaa !13
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %47, label %42

42:                                               ; preds = %39
  %43 = call noundef zeroext i1 @_ZSt7signbitIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEbE6__typeES2_(i64 noundef %40)
  %44 = load i64, ptr %37, align 8, !tbaa !13
  %45 = call noundef zeroext i1 @_ZSt7signbitIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEbE6__typeES2_(i64 noundef %44)
  %46 = xor i1 %43, %45
  br i1 %46, label %47, label %58

47:                                               ; preds = %42, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %48 = load i64, ptr %37, align 8, !tbaa !13
  %49 = shl nsw i64 %48, 1
  store i64 %49, ptr %4, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %50 unwind label %54

50:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store i64 0, ptr %5, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %51 unwind label %56

51:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %.thread unwind label %52

52:                                               ; preds = %51, %36, %.lr.ph
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %166

54:                                               ; preds = %47
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %166

56:                                               ; preds = %50
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %166

58:                                               ; preds = %42
  %59 = load i64, ptr %37, align 8, !tbaa !13
  %60 = icmp slt i64 %59, 0
  br i1 %60, label %61, label %78

61:                                               ; preds = %58
  %62 = load i64, ptr %34, align 8, !tbaa !13
  %63 = shl nsw i64 %62, 1
  %64 = icmp slt i64 %59, %63
  br i1 %64, label %65, label %.thread

65:                                               ; preds = %61
  %66 = sub nsw i64 %59, %63
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %67 = add nsw i64 %66, %59
  store i64 %67, ptr %6, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %68 unwind label %72

68:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %69 = load i64, ptr %37, align 8, !tbaa !13
  %70 = sub nsw i64 %69, %66
  store i64 %70, ptr %7, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %71 unwind label %74

71:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %.thread unwind label %76

72:                                               ; preds = %65
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %166

74:                                               ; preds = %68
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %166

76:                                               ; preds = %71
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %166

78:                                               ; preds = %58
  %.not97 = icmp eq i64 %59, 0
  br i1 %.not97, label %.thread, label %79

79:                                               ; preds = %78
  %80 = load i64, ptr %34, align 8, !tbaa !13
  %81 = shl nsw i64 %80, 1
  %82 = icmp sgt i64 %59, %81
  br i1 %82, label %83, label %.thread

83:                                               ; preds = %79
  %84 = sub nsw i64 %59, %81
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %85 = add nsw i64 %84, %59
  store i64 %85, ptr %8, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %86 unwind label %90

86:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %87 = load i64, ptr %37, align 8, !tbaa !13
  %88 = sub nsw i64 %87, %84
  store i64 %88, ptr %9, align 8, !tbaa !13
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %89 unwind label %92

89:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %.thread unwind label %94

90:                                               ; preds = %83
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %166

92:                                               ; preds = %86
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %166

94:                                               ; preds = %89
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %166

.thread:                                          ; preds = %61, %89, %71, %51, %78, %79
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %96 = load i32, ptr %1, align 4, !tbaa !11
  %97 = sext i32 %96 to i64
  %98 = icmp slt i64 %indvars.iv.next, %97
  br i1 %98, label %.lr.ph, label %._crit_edge, !llvm.loop !15

99:                                               ; preds = %._crit_edge
  %100 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %101 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEEvT_S7_(ptr %100, ptr %101)
          to label %102 unwind label %115

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store i64 0, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %103

103:                                              ; preds = %147, %102
  %.067 = phi i64 [ 0, %102 ], [ %.168, %147 ]
  %.065 = phi i64 [ 0, %102 ], [ %.166, %147 ]
  %.063 = phi i64 [ 0, %102 ], [ %.164, %147 ]
  %.062 = phi i64 [ 0, %102 ], [ %.1, %147 ]
  %104 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %sext = shl i64 %104, 32
  %105 = ashr exact i64 %sext, 32
  %106 = icmp slt i64 %.065, %105
  br i1 %106, label %.critedge, label %107

107:                                              ; preds = %103
  %108 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %sext81 = shl i64 %108, 32
  %109 = ashr exact i64 %sext81, 32
  %110 = icmp slt i64 %.063, %109
  br i1 %110, label %.critedge, label %.preheader

.preheader:                                       ; preds = %107
  %111 = load i32, ptr %1, align 4, !tbaa !11
  %112 = icmp sgt i32 %111, 0
  br i1 %112, label %.lr.ph101, label %._crit_edge102

.critedge:                                        ; preds = %103, %107
  %113 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %sext82 = shl i64 %113, 32
  %114 = ashr exact i64 %sext82, 32
  %.not = icmp slt i64 %.065, %114
  br i1 %.not, label %117, label %.critedge93

115:                                              ; preds = %99, %._crit_edge
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %166

117:                                              ; preds = %.critedge
  %118 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %sext83 = shl i64 %118, 32
  %119 = ashr exact i64 %sext83, 32
  %.not84 = icmp slt i64 %.063, %119
  br i1 %.not84, label %120, label %.critedge95

120:                                              ; preds = %117
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.065) #8
  %122 = load i64, ptr %121, align 8, !tbaa !13
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.063) #8
  %124 = load i64, ptr %123, align 8, !tbaa !13
  %.not96 = icmp sgt i64 %122, %124
  br i1 %.not96, label %.critedge93, label %.critedge95

.critedge95:                                      ; preds = %117, %120
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.065) #8
  %126 = load i64, ptr %125, align 8, !tbaa !13
  %127 = sub nsw i64 %126, %.062
  %128 = mul nsw i64 %127, %.067
  %129 = load i64, ptr %10, align 8, !tbaa !13
  %130 = add nsw i64 %128, %129
  store i64 %130, ptr %10, align 8, !tbaa !13
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %132 = load i64, ptr %131, align 8, !tbaa !13
  store i64 %132, ptr %11, align 8, !tbaa !13
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.065) #8
  %134 = add nsw i64 %.067, 1
  %135 = add nsw i64 %.065, 1
  br label %147

.critedge93:                                      ; preds = %.critedge, %120
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.063) #8
  %137 = load i64, ptr %136, align 8, !tbaa !13
  %138 = sub nsw i64 %137, %.062
  %139 = mul nsw i64 %138, %.067
  %140 = load i64, ptr %10, align 8, !tbaa !13
  %141 = add nsw i64 %139, %140
  store i64 %141, ptr %10, align 8, !tbaa !13
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %143 = load i64, ptr %142, align 8, !tbaa !13
  store i64 %143, ptr %11, align 8, !tbaa !13
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.063) #8
  %145 = add nsw i64 %.067, -2
  %146 = add nsw i64 %.063, 1
  br label %147

147:                                              ; preds = %.critedge93, %.critedge95
  %.168 = phi i64 [ %134, %.critedge95 ], [ %145, %.critedge93 ]
  %.166 = phi i64 [ %135, %.critedge95 ], [ %.065, %.critedge93 ]
  %.164 = phi i64 [ %.063, %.critedge95 ], [ %146, %.critedge93 ]
  %.1.in = phi ptr [ %133, %.critedge95 ], [ %144, %.critedge93 ]
  %.1 = load i64, ptr %.1.in, align 8, !tbaa !13
  br label %103, !llvm.loop !17

._crit_edge102:                                   ; preds = %.lr.ph101, %.preheader
  %.060.lcssa = phi i64 [ 0, %.preheader ], [ %157, %.lr.ph101 ]
  %148 = load i64, ptr %11, align 8, !tbaa !13
  %149 = sub nsw i64 %.060.lcssa, %148
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %149)
          to label %161 unwind label %164

.lr.ph101:                                        ; preds = %.preheader, %.lr.ph101
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %.lr.ph101 ], [ 0, %.preheader ]
  %.06099 = phi i64 [ %157, %.lr.ph101 ], [ 0, %.preheader ]
  %151 = getelementptr inbounds i64, ptr %26, i64 %indvars.iv104
  %152 = load i64, ptr %151, align 8, !tbaa !13
  %153 = getelementptr inbounds i64, ptr %29, i64 %indvars.iv104
  %154 = load i64, ptr %153, align 8, !tbaa !13
  %155 = sub nsw i64 %152, %154
  %156 = call noundef i64 @_ZSt3absx(i64 noundef %155)
  %157 = add nsw i64 %156, %.06099
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %158 = load i32, ptr %1, align 4, !tbaa !11
  %159 = sext i32 %158 to i64
  %160 = icmp slt i64 %indvars.iv.next105, %159
  br i1 %160, label %.lr.ph101, label %._crit_edge102, !llvm.loop !18

161:                                              ; preds = %._crit_edge102
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %163 unwind label %164

163:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.stackrestore.p0(ptr %25)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

164:                                              ; preds = %161, %._crit_edge102
  %165 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %166

166:                                              ; preds = %52, %54, %56, %76, %74, %72, %94, %92, %90, %164, %115
  %.pn89.pn = phi { ptr, i32 } [ %165, %164 ], [ %116, %115 ], [ %53, %52 ], [ %57, %56 ], [ %55, %54 ], [ %77, %76 ], [ %75, %74 ], [ %73, %72 ], [ %95, %94 ], [ %93, %92 ], [ %91, %90 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn89.pn
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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 #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt7signbitIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEbE6__typeES2_(i64 noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) local_unnamed_addr #7

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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


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