; LLVM IR from DionysiosB/CodeForces :: 0800-0899 (855B-MarvoloGauntsRing)

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

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 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 i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::vector.0", align 8
  %13 = alloca %"class.std::allocator.2", align 1
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca %"class.std::allocator.2", align 1
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 3, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %22 = load i64, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %22, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %23 unwind label %29

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

24:                                               ; preds = %38, %23
  %25 = load i64, ptr %11, align 8, !tbaa !9
  %26 = load i64, ptr %3, align 8, !tbaa !9
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %33, label %28

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

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %9, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  br label %272

33:                                               ; preds = %24
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %34) #5
  %36 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %35)
          to label %37 unwind label %41

37:                                               ; preds = %33
  br label %38

38:                                               ; preds = %37
  %39 = load i64, ptr %11, align 8, !tbaa !9
  %40 = add nsw i64 %39, 1
  store i64 %40, ptr %11, align 8, !tbaa !9
  br label %24, !llvm.loop !11

41:                                               ; preds = %33
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %9, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %271

45:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  %46 = load i64, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %46, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %47 unwind label %59

47:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #5
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #5
  %51 = getelementptr inbounds %"struct.std::pair", ptr %50, i32 0, i32 1
  store i64 %49, ptr %51, align 8, !tbaa !13
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #5
  %53 = getelementptr inbounds %"struct.std::pair", ptr %52, i32 0, i32 0
  store i64 %49, ptr %53, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 1, ptr %14, align 8, !tbaa !9
  br label %54

54:                                               ; preds = %112, %47
  %55 = load i64, ptr %14, align 8, !tbaa !9
  %56 = load i64, ptr %3, align 8, !tbaa !9
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %63, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %115

59:                                               ; preds = %45
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  br label %270

63:                                               ; preds = %54
  %64 = load i64, ptr %14, align 8, !tbaa !9
  %65 = sub nsw i64 %64, 1
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %65) #5
  %67 = getelementptr inbounds %"struct.std::pair", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !15
  %69 = load i64, ptr %14, align 8, !tbaa !9
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %69) #5
  %71 = load i64, ptr %70, align 8, !tbaa !9
  %72 = icmp slt i64 %68, %71
  br i1 %72, label %73, label %79

73:                                               ; preds = %63
  %74 = load i64, ptr %14, align 8, !tbaa !9
  %75 = sub nsw i64 %74, 1
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %75) #5
  %77 = getelementptr inbounds %"struct.std::pair", ptr %76, i32 0, i32 0
  %78 = load i64, ptr %77, align 8, !tbaa !15
  br label %83

79:                                               ; preds = %63
  %80 = load i64, ptr %14, align 8, !tbaa !9
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %80) #5
  %82 = load i64, ptr %81, align 8, !tbaa !9
  br label %83

83:                                               ; preds = %79, %73
  %84 = phi i64 [ %78, %73 ], [ %82, %79 ]
  %85 = load i64, ptr %14, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %85) #5
  %87 = getelementptr inbounds %"struct.std::pair", ptr %86, i32 0, i32 0
  store i64 %84, ptr %87, align 8, !tbaa !15
  %88 = load i64, ptr %14, align 8, !tbaa !9
  %89 = sub nsw i64 %88, 1
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %89) #5
  %91 = getelementptr inbounds %"struct.std::pair", ptr %90, i32 0, i32 1
  %92 = load i64, ptr %91, align 8, !tbaa !13
  %93 = load i64, ptr %14, align 8, !tbaa !9
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %93) #5
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = icmp sgt i64 %92, %95
  br i1 %96, label %97, label %103

97:                                               ; preds = %83
  %98 = load i64, ptr %14, align 8, !tbaa !9
  %99 = sub nsw i64 %98, 1
  %100 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %99) #5
  %101 = getelementptr inbounds %"struct.std::pair", ptr %100, i32 0, i32 1
  %102 = load i64, ptr %101, align 8, !tbaa !13
  br label %107

103:                                              ; preds = %83
  %104 = load i64, ptr %14, align 8, !tbaa !9
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %104) #5
  %106 = load i64, ptr %105, align 8, !tbaa !9
  br label %107

107:                                              ; preds = %103, %97
  %108 = phi i64 [ %102, %97 ], [ %106, %103 ]
  %109 = load i64, ptr %14, align 8, !tbaa !9
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %109) #5
  %111 = getelementptr inbounds %"struct.std::pair", ptr %110, i32 0, i32 1
  store i64 %108, ptr %111, align 8, !tbaa !13
  br label %112

112:                                              ; preds = %107
  %113 = load i64, ptr %14, align 8, !tbaa !9
  %114 = add nsw i64 %113, 1
  store i64 %114, ptr %14, align 8, !tbaa !9
  br label %54, !llvm.loop !16

115:                                              ; preds = %58
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  %116 = load i64, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %116, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %117 unwind label %136

117:                                              ; preds = %115
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  %118 = load i64, ptr %3, align 8, !tbaa !9
  %119 = sub nsw i64 %118, 1
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %119) #5
  %121 = load i64, ptr %120, align 8, !tbaa !9
  %122 = load i64, ptr %3, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %123) #5
  %125 = getelementptr inbounds %"struct.std::pair", ptr %124, i32 0, i32 1
  store i64 %121, ptr %125, align 8, !tbaa !13
  %126 = load i64, ptr %3, align 8, !tbaa !9
  %127 = sub nsw i64 %126, 1
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %127) #5
  %129 = getelementptr inbounds %"struct.std::pair", ptr %128, i32 0, i32 0
  store i64 %121, ptr %129, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %130 = load i64, ptr %3, align 8, !tbaa !9
  %131 = sub nsw i64 %130, 2
  store i64 %131, ptr %17, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %189, %117
  %133 = load i64, ptr %17, align 8, !tbaa !9
  %134 = icmp sge i64 %133, 0
  br i1 %134, label %140, label %135

135:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %192

136:                                              ; preds = %115
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %9, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %10, align 4
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %269

140:                                              ; preds = %132
  %141 = load i64, ptr %17, align 8, !tbaa !9
  %142 = add nsw i64 %141, 1
  %143 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %142) #5
  %144 = getelementptr inbounds %"struct.std::pair", ptr %143, i32 0, i32 0
  %145 = load i64, ptr %144, align 8, !tbaa !15
  %146 = load i64, ptr %17, align 8, !tbaa !9
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %146) #5
  %148 = load i64, ptr %147, align 8, !tbaa !9
  %149 = icmp slt i64 %145, %148
  br i1 %149, label %150, label %156

150:                                              ; preds = %140
  %151 = load i64, ptr %17, align 8, !tbaa !9
  %152 = add nsw i64 %151, 1
  %153 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %152) #5
  %154 = getelementptr inbounds %"struct.std::pair", ptr %153, i32 0, i32 0
  %155 = load i64, ptr %154, align 8, !tbaa !15
  br label %160

156:                                              ; preds = %140
  %157 = load i64, ptr %17, align 8, !tbaa !9
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %157) #5
  %159 = load i64, ptr %158, align 8, !tbaa !9
  br label %160

160:                                              ; preds = %156, %150
  %161 = phi i64 [ %155, %150 ], [ %159, %156 ]
  %162 = load i64, ptr %17, align 8, !tbaa !9
  %163 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %162) #5
  %164 = getelementptr inbounds %"struct.std::pair", ptr %163, i32 0, i32 0
  store i64 %161, ptr %164, align 8, !tbaa !15
  %165 = load i64, ptr %17, align 8, !tbaa !9
  %166 = add nsw i64 %165, 1
  %167 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %166) #5
  %168 = getelementptr inbounds %"struct.std::pair", ptr %167, i32 0, i32 1
  %169 = load i64, ptr %168, align 8, !tbaa !13
  %170 = load i64, ptr %17, align 8, !tbaa !9
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %170) #5
  %172 = load i64, ptr %171, align 8, !tbaa !9
  %173 = icmp sgt i64 %169, %172
  br i1 %173, label %174, label %180

174:                                              ; preds = %160
  %175 = load i64, ptr %17, align 8, !tbaa !9
  %176 = add nsw i64 %175, 1
  %177 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %176) #5
  %178 = getelementptr inbounds %"struct.std::pair", ptr %177, i32 0, i32 1
  %179 = load i64, ptr %178, align 8, !tbaa !13
  br label %184

180:                                              ; preds = %160
  %181 = load i64, ptr %17, align 8, !tbaa !9
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %181) #5
  %183 = load i64, ptr %182, align 8, !tbaa !9
  br label %184

184:                                              ; preds = %180, %174
  %185 = phi i64 [ %179, %174 ], [ %183, %180 ]
  %186 = load i64, ptr %17, align 8, !tbaa !9
  %187 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %186) #5
  %188 = getelementptr inbounds %"struct.std::pair", ptr %187, i32 0, i32 1
  store i64 %185, ptr %188, align 8, !tbaa !13
  br label %189

189:                                              ; preds = %184
  %190 = load i64, ptr %17, align 8, !tbaa !9
  %191 = add nsw i64 %190, -1
  store i64 %191, ptr %17, align 8, !tbaa !9
  br label %132, !llvm.loop !17

192:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 -5000000000000000000, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %193

193:                                              ; preds = %257, %192
  %194 = load i64, ptr %19, align 8, !tbaa !9
  %195 = load i64, ptr %3, align 8, !tbaa !9
  %196 = icmp slt i64 %194, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %260

198:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 0, ptr %20, align 8, !tbaa !9
  %199 = load i64, ptr %4, align 8, !tbaa !9
  %200 = icmp slt i64 %199, 0
  br i1 %200, label %201, label %210

201:                                              ; preds = %198
  %202 = load i64, ptr %4, align 8, !tbaa !9
  %203 = load i64, ptr %19, align 8, !tbaa !9
  %204 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %203) #5
  %205 = getelementptr inbounds %"struct.std::pair", ptr %204, i32 0, i32 0
  %206 = load i64, ptr %205, align 8, !tbaa !15
  %207 = mul nsw i64 %202, %206
  %208 = load i64, ptr %20, align 8, !tbaa !9
  %209 = add nsw i64 %208, %207
  store i64 %209, ptr %20, align 8, !tbaa !9
  br label %219

210:                                              ; preds = %198
  %211 = load i64, ptr %4, align 8, !tbaa !9
  %212 = load i64, ptr %19, align 8, !tbaa !9
  %213 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %212) #5
  %214 = getelementptr inbounds %"struct.std::pair", ptr %213, i32 0, i32 1
  %215 = load i64, ptr %214, align 8, !tbaa !13
  %216 = mul nsw i64 %211, %215
  %217 = load i64, ptr %20, align 8, !tbaa !9
  %218 = add nsw i64 %217, %216
  store i64 %218, ptr %20, align 8, !tbaa !9
  br label %219

219:                                              ; preds = %210, %201
  %220 = load i64, ptr %5, align 8, !tbaa !9
  %221 = load i64, ptr %19, align 8, !tbaa !9
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %221) #5
  %223 = load i64, ptr %222, align 8, !tbaa !9
  %224 = mul nsw i64 %220, %223
  %225 = load i64, ptr %20, align 8, !tbaa !9
  %226 = add nsw i64 %225, %224
  store i64 %226, ptr %20, align 8, !tbaa !9
  %227 = load i64, ptr %6, align 8, !tbaa !9
  %228 = icmp slt i64 %227, 0
  br i1 %228, label %229, label %238

229:                                              ; preds = %219
  %230 = load i64, ptr %6, align 8, !tbaa !9
  %231 = load i64, ptr %19, align 8, !tbaa !9
  %232 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %231) #5
  %233 = getelementptr inbounds %"struct.std::pair", ptr %232, i32 0, i32 0
  %234 = load i64, ptr %233, align 8, !tbaa !15
  %235 = mul nsw i64 %230, %234
  %236 = load i64, ptr %20, align 8, !tbaa !9
  %237 = add nsw i64 %236, %235
  store i64 %237, ptr %20, align 8, !tbaa !9
  br label %247

238:                                              ; preds = %219
  %239 = load i64, ptr %6, align 8, !tbaa !9
  %240 = load i64, ptr %19, align 8, !tbaa !9
  %241 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %240) #5
  %242 = getelementptr inbounds %"struct.std::pair", ptr %241, i32 0, i32 1
  %243 = load i64, ptr %242, align 8, !tbaa !13
  %244 = mul nsw i64 %239, %243
  %245 = load i64, ptr %20, align 8, !tbaa !9
  %246 = add nsw i64 %245, %244
  store i64 %246, ptr %20, align 8, !tbaa !9
  br label %247

247:                                              ; preds = %238, %229
  %248 = load i64, ptr %18, align 8, !tbaa !9
  %249 = load i64, ptr %20, align 8, !tbaa !9
  %250 = icmp sgt i64 %248, %249
  br i1 %250, label %251, label %253

251:                                              ; preds = %247
  %252 = load i64, ptr %18, align 8, !tbaa !9
  br label %255

253:                                              ; preds = %247
  %254 = load i64, ptr %20, align 8, !tbaa !9
  br label %255

255:                                              ; preds = %253, %251
  %256 = phi i64 [ %252, %251 ], [ %254, %253 ]
  store i64 %256, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %257

257:                                              ; preds = %255
  %258 = load i64, ptr %19, align 8, !tbaa !9
  %259 = add nsw i64 %258, 1
  store i64 %259, ptr %19, align 8, !tbaa !9
  br label %193, !llvm.loop !18

260:                                              ; preds = %197
  %261 = load i64, ptr %18, align 8, !tbaa !9
  %262 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %261)
          to label %263 unwind label %265

263:                                              ; preds = %260
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %264 = load i32, ptr %1, align 4
  ret i32 %264

265:                                              ; preds = %260
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %9, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  br label %269

269:                                              ; preds = %265, %136
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br label %270

270:                                              ; preds = %269, %59
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %271

271:                                              ; preds = %270, %41
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %272

272:                                              ; preds = %271, %29
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %273

273:                                              ; preds = %272
  %274 = load ptr, ptr %9, align 8
  %275 = load i32, ptr %10, align 4
  %276 = insertvalue { ptr, i32 } poison, ptr %274, 0
  %277 = insertvalue { ptr, i32 } %276, i32 %275, 1
  resume { ptr, i32 } %277
}

; 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 @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEED2Ev(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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(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 = { nounwind }

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

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


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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca 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::allocator.2", align 1
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::allocator.2", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %12 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %13 unwind label %16

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

._crit_edge:                                      ; preds = %.lr.ph, %13
  %.lcssa67 = phi i64 [ %14, %13 ], [ %21, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.lcssa67, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %23 unwind label %31

16:                                               ; preds = %0
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %130

.lr.ph:                                           ; preds = %13, %.lr.ph
  %.05068 = phi i64 [ %20, %.lr.ph ], [ 0, %13 ]
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.05068) #6
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %18)
  %20 = add nuw nsw i64 %.05068, 1
  %21 = load i64, ptr %1, align 8, !tbaa !5
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !9

23:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #6
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #6
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  store i64 %25, ptr %27, align 8, !tbaa !11
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #6
  store i64 %25, ptr %28, align 8, !tbaa !13
  %29 = load i64, ptr %1, align 8, !tbaa !5
  %30 = icmp sgt i64 %29, 1
  br i1 %30, label %.lr.ph71, label %._crit_edge72

._crit_edge72:                                    ; preds = %57, %23
  %.lcssa = phi i64 [ %29, %23 ], [ %62, %57 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.lcssa, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %64 unwind label %81

31:                                               ; preds = %._crit_edge
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  br label %129

.lr.ph71:                                         ; preds = %23, %57
  %.04969 = phi i64 [ %61, %57 ], [ 1, %23 ]
  %33 = add nsw i64 %.04969, -1
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %33) #6
  %35 = load i64, ptr %34, align 8, !tbaa !13
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04969) #6
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = icmp slt i64 %35, %37
  br i1 %38, label %39, label %41

39:                                               ; preds = %.lr.ph71
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %33) #6
  br label %43

41:                                               ; preds = %.lr.ph71
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04969) #6
  br label %43

43:                                               ; preds = %41, %39
  %.in65 = phi ptr [ %40, %39 ], [ %42, %41 ]
  %44 = load i64, ptr %.in65, align 8, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.04969) #6
  store i64 %44, ptr %45, align 8, !tbaa !13
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %33) #6
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load i64, ptr %47, align 8, !tbaa !11
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04969) #6
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = icmp sgt i64 %48, %50
  br i1 %51, label %52, label %55

52:                                               ; preds = %43
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %33) #6
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  br label %57

55:                                               ; preds = %43
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04969) #6
  br label %57

57:                                               ; preds = %55, %52
  %.in66 = phi ptr [ %54, %52 ], [ %56, %55 ]
  %58 = load i64, ptr %.in66, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.04969) #6
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  store i64 %58, ptr %60, align 8, !tbaa !11
  %61 = add nuw nsw i64 %.04969, 1
  %62 = load i64, ptr %1, align 8, !tbaa !5
  %63 = icmp slt i64 %61, %62
  br i1 %63, label %.lr.ph71, label %._crit_edge72, !llvm.loop !14

64:                                               ; preds = %._crit_edge72
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  %65 = load i64, ptr %1, align 8, !tbaa !5
  %66 = add nsw i64 %65, -1
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %66) #6
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = load i64, ptr %1, align 8, !tbaa !5
  %70 = add nsw i64 %69, -1
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %70) #6
  %72 = getelementptr inbounds i8, ptr %71, i64 8
  store i64 %68, ptr %72, align 8, !tbaa !11
  %73 = load i64, ptr %1, align 8, !tbaa !5
  %74 = add nsw i64 %73, -1
  %75 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %74) #6
  store i64 %68, ptr %75, align 8, !tbaa !13
  %76 = load i64, ptr %1, align 8, !tbaa !5
  %77 = icmp sgt i64 %76, 1
  br i1 %77, label %.lr.ph76.preheader, label %.preheader

.lr.ph76.preheader:                               ; preds = %64
  %78 = add nsw i64 %76, -2
  br label %.lr.ph76

.preheader.loopexit:                              ; preds = %107
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %64
  %79 = phi i64 [ %.pre, %.preheader.loopexit ], [ %76, %64 ]
  %80 = icmp sgt i64 %79, 0
  br i1 %80, label %.lr.ph79, label %._crit_edge80

81:                                               ; preds = %._crit_edge72
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %129

.lr.ph76:                                         ; preds = %.lr.ph76.preheader, %107
  %.04874 = phi i64 [ %111, %107 ], [ %78, %.lr.ph76.preheader ]
  %83 = add nuw nsw i64 %.04874, 1
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %83) #6
  %85 = load i64, ptr %84, align 8, !tbaa !13
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04874) #6
  %87 = load i64, ptr %86, align 8, !tbaa !5
  %88 = icmp slt i64 %85, %87
  br i1 %88, label %89, label %91

89:                                               ; preds = %.lr.ph76
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %83) #6
  br label %93

91:                                               ; preds = %.lr.ph76
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04874) #6
  br label %93

93:                                               ; preds = %91, %89
  %.in = phi ptr [ %90, %89 ], [ %92, %91 ]
  %94 = load i64, ptr %.in, align 8, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.04874) #6
  store i64 %94, ptr %95, align 8, !tbaa !13
  %96 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %83) #6
  %97 = getelementptr inbounds i8, ptr %96, i64 8
  %98 = load i64, ptr %97, align 8, !tbaa !11
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04874) #6
  %100 = load i64, ptr %99, align 8, !tbaa !5
  %101 = icmp sgt i64 %98, %100
  br i1 %101, label %102, label %105

102:                                              ; preds = %93
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %83) #6
  %104 = getelementptr inbounds i8, ptr %103, i64 8
  br label %107

105:                                              ; preds = %93
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04874) #6
  br label %107

107:                                              ; preds = %105, %102
  %.in64 = phi ptr [ %104, %102 ], [ %106, %105 ]
  %108 = load i64, ptr %.in64, align 8, !tbaa !5
  %109 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.04874) #6
  %110 = getelementptr inbounds i8, ptr %109, i64 8
  store i64 %108, ptr %110, align 8, !tbaa !11
  %111 = add nsw i64 %.04874, -1
  %112 = icmp sgt i64 %.04874, 0
  br i1 %112, label %.lr.ph76, label %.preheader.loopexit, !llvm.loop !15

._crit_edge80:                                    ; preds = %.lr.ph79, %.preheader
  %.047.lcssa = phi i64 [ -5000000000000000000, %.preheader ], [ %125, %.lr.ph79 ]
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.047.lcssa)
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

.lr.ph79:                                         ; preds = %.preheader, %.lr.ph79
  %.04678 = phi i64 [ %126, %.lr.ph79 ], [ 0, %.preheader ]
  %.04777 = phi i64 [ %125, %.lr.ph79 ], [ -5000000000000000000, %.preheader ]
  %114 = load i64, ptr %2, align 8, !tbaa !5
  %115 = icmp slt i64 %114, 0
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.04678) #6
  %.pn61.in.idx = select i1 %115, i64 0, i64 8
  %.pn61.in = getelementptr inbounds i8, ptr %116, i64 %.pn61.in.idx
  %.pn61 = load i64, ptr %.pn61.in, align 8, !tbaa !5
  %.0 = mul nsw i64 %.pn61, %114
  %117 = load i64, ptr %3, align 8, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.04678) #6
  %119 = load i64, ptr %118, align 8, !tbaa !5
  %120 = mul nsw i64 %119, %117
  %121 = add nsw i64 %120, %.0
  %122 = load i64, ptr %4, align 8, !tbaa !5
  %123 = icmp slt i64 %122, 0
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.04678) #6
  %.pn63.in.idx = select i1 %123, i64 0, i64 8
  %.pn63.in = getelementptr inbounds i8, ptr %124, i64 %.pn63.in.idx
  %.pn63 = load i64, ptr %.pn63.in, align 8, !tbaa !5
  %.pn62 = mul nsw i64 %.pn63, %122
  %.1 = add nsw i64 %121, %.pn62
  %125 = call i64 @llvm.smax.i64(i64 %.04777, i64 %.1)
  %126 = add nuw nsw i64 %.04678, 1
  %127 = load i64, ptr %1, align 8, !tbaa !5
  %128 = icmp slt i64 %126, %127
  br i1 %128, label %.lr.ph79, label %._crit_edge80, !llvm.loop !16

129:                                              ; preds = %81, %31
  %.pn = phi { ptr, i32 } [ %82, %81 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %130

130:                                              ; preds = %129, %16
  %.pn.pn = phi { ptr, i32 } [ %.pn, %129 ], [ %17, %16 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: 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 @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEED2Ev(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

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

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!12, !6, i64 8}
!12 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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