; LLVM IR from DionysiosB/CodeForces :: 1200-1299 (1257D-YetAnotherMonsterKillingProblem)

; 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 }
%"class.std::reverse_iterator" = type { %"class.__gnu_cxx::__normal_iterator" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type { i64, i64 }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::reverse_iterator", align 8
  %15 = alloca %"class.std::reverse_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector.0", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %25

25:                                               ; preds = %217, %215, %0
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = add nsw i64 %26, -1
  store i64 %27, ptr %2, align 8, !tbaa !5
  %28 = icmp ne i64 %26, 0
  br i1 %28, label %29, label %228

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  %31 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %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 %31, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %32 unwind label %38

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

33:                                               ; preds = %60, %32
  %34 = load i64, ptr %9, align 8, !tbaa !5
  %35 = load i64, ptr %3, align 8, !tbaa !5
  %36 = icmp slt i64 %34, %35
  br i1 %36, label %42, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %67

38:                                               ; preds = %29
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  br label %227

42:                                               ; preds = %33
  %43 = load i64, ptr %9, align 8, !tbaa !5
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %43) #6
  %45 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %44)
          to label %46 unwind label %63

46:                                               ; preds = %42
  %47 = load i64, ptr %4, align 8, !tbaa !5
  %48 = load i64, ptr %9, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %48) #6
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = icmp sgt i64 %47, %50
  br i1 %51, label %52, label %54

52:                                               ; preds = %46
  %53 = load i64, ptr %4, align 8, !tbaa !5
  br label %58

54:                                               ; preds = %46
  %55 = load i64, ptr %9, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %55) #6
  %57 = load i64, ptr %56, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %54, %52
  %59 = phi i64 [ %53, %52 ], [ %57, %54 ]
  store i64 %59, ptr %4, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %58
  %61 = load i64, ptr %9, align 8, !tbaa !5
  %62 = add nsw i64 %61, 1
  store i64 %62, ptr %9, align 8, !tbaa !5
  br label %33, !llvm.loop !9

63:                                               ; preds = %42
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %226

67:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %68 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %10)
          to label %69 unwind label %77

69:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  %70 = load i64, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %70, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %71 unwind label %81

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

72:                                               ; preds = %94, %71
  %73 = load i64, ptr %13, align 8, !tbaa !5
  %74 = load i64, ptr %10, align 8, !tbaa !5
  %75 = icmp slt i64 %73, %74
  br i1 %75, label %85, label %76

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

77:                                               ; preds = %67
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  br label %225

81:                                               ; preds = %69
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %224

85:                                               ; preds = %72
  %86 = load i64, ptr %13, align 8, !tbaa !5
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %86) #6
  %88 = getelementptr inbounds %"struct.std::pair", ptr %87, i32 0, i32 0
  %89 = load i64, ptr %13, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %89) #6
  %91 = getelementptr inbounds %"struct.std::pair", ptr %90, i32 0, i32 1
  %92 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %88, ptr noundef %91)
          to label %93 unwind label %97

93:                                               ; preds = %85
  br label %94

94:                                               ; preds = %93
  %95 = load i64, ptr %13, align 8, !tbaa !5
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %13, align 8, !tbaa !5
  br label %72, !llvm.loop !11

97:                                               ; preds = %85
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %223

101:                                              ; preds = %76
  call void @_ZNSt6vectorISt4pairIllESaIS1_EE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @_ZNSt6vectorISt4pairIllESaIS1_EE4rendEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  invoke void @_ZSt4sortISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS4_SaIS4_EEEEEEvT_SB_(ptr noundef %14, ptr noundef %15)
          to label %102 unwind label %111

102:                                              ; preds = %101
  %103 = load i64, ptr %4, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef 0) #6
  %105 = getelementptr inbounds %"struct.std::pair", ptr %104, i32 0, i32 0
  %106 = load i64, ptr %105, align 8, !tbaa !12
  %107 = icmp sgt i64 %103, %106
  br i1 %107, label %108, label %115

108:                                              ; preds = %102
  %109 = invoke i32 @puts(ptr noundef @.str.2)
          to label %110 unwind label %111

110:                                              ; preds = %108
  store i32 2, ptr %16, align 4
  br label %215, !llvm.loop !14

111:                                              ; preds = %108, %101
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %7, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %8, align 4
  br label %223

115:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef 0) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(16) %116)
          to label %117 unwind label %123

117:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store i64 1, ptr %18, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %141, %117
  %119 = load i64, ptr %18, align 8, !tbaa !5
  %120 = load i64, ptr %10, align 8, !tbaa !5
  %121 = icmp slt i64 %119, %120
  br i1 %121, label %127, label %122

122:                                              ; preds = %118
  store i32 10, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %148

123:                                              ; preds = %115
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %7, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %8, align 4
  br label %222

127:                                              ; preds = %118
  %128 = load i64, ptr %18, align 8, !tbaa !5
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %128) #6
  %130 = getelementptr inbounds %"struct.std::pair", ptr %129, i32 0, i32 1
  %131 = load i64, ptr %130, align 8, !tbaa !15
  %132 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %133 = getelementptr inbounds %"struct.std::pair", ptr %132, i32 0, i32 1
  %134 = load i64, ptr %133, align 8, !tbaa !15
  %135 = icmp sle i64 %131, %134
  br i1 %135, label %136, label %137

136:                                              ; preds = %127
  br label %141

137:                                              ; preds = %127
  %138 = load i64, ptr %18, align 8, !tbaa !5
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %138) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(16) %139)
          to label %140 unwind label %144

140:                                              ; preds = %137
  br label %141

141:                                              ; preds = %140, %136
  %142 = load i64, ptr %18, align 8, !tbaa !5
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %18, align 8, !tbaa !5
  br label %118, !llvm.loop !16

144:                                              ; preds = %137
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %7, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %222

148:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store i64 0, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store i64 0, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store i64 0, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store i64 0, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  store i64 0, ptr %23, align 8, !tbaa !5
  br label %149

149:                                              ; preds = %207, %148
  %150 = load i64, ptr %23, align 8, !tbaa !5
  %151 = load i64, ptr %3, align 8, !tbaa !5
  %152 = icmp slt i64 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 13, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %210

154:                                              ; preds = %149
  %155 = load i64, ptr %20, align 8, !tbaa !5
  %156 = load i64, ptr %23, align 8, !tbaa !5
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %156) #6
  %158 = load i64, ptr %157, align 8, !tbaa !5
  %159 = icmp sgt i64 %155, %158
  br i1 %159, label %160, label %162

160:                                              ; preds = %154
  %161 = load i64, ptr %20, align 8, !tbaa !5
  br label %166

162:                                              ; preds = %154
  %163 = load i64, ptr %23, align 8, !tbaa !5
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %163) #6
  %165 = load i64, ptr %164, align 8, !tbaa !5
  br label %166

166:                                              ; preds = %162, %160
  %167 = phi i64 [ %161, %160 ], [ %165, %162 ]
  store i64 %167, ptr %20, align 8, !tbaa !5
  %168 = load i64, ptr %20, align 8, !tbaa !5
  %169 = load i64, ptr %19, align 8, !tbaa !5
  %170 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %169) #6
  %171 = getelementptr inbounds %"struct.std::pair", ptr %170, i32 0, i32 0
  %172 = load i64, ptr %171, align 8, !tbaa !12
  %173 = icmp sle i64 %168, %172
  br i1 %173, label %174, label %184

174:                                              ; preds = %166
  %175 = load i64, ptr %21, align 8, !tbaa !5
  %176 = load i64, ptr %19, align 8, !tbaa !5
  %177 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %176) #6
  %178 = getelementptr inbounds %"struct.std::pair", ptr %177, i32 0, i32 1
  %179 = load i64, ptr %178, align 8, !tbaa !15
  %180 = icmp slt i64 %175, %179
  br i1 %180, label %181, label %184

181:                                              ; preds = %174
  %182 = load i64, ptr %21, align 8, !tbaa !5
  %183 = add nsw i64 %182, 1
  store i64 %183, ptr %21, align 8, !tbaa !5
  br label %206

184:                                              ; preds = %174, %166
  %185 = load i64, ptr %19, align 8, !tbaa !5
  %186 = add nsw i64 %185, 1
  %187 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %188 = icmp ult i64 %186, %187
  br i1 %188, label %189, label %202

189:                                              ; preds = %184
  %190 = load i64, ptr %20, align 8, !tbaa !5
  %191 = load i64, ptr %19, align 8, !tbaa !5
  %192 = add nsw i64 %191, 1
  %193 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %192) #6
  %194 = getelementptr inbounds %"struct.std::pair", ptr %193, i32 0, i32 0
  %195 = load i64, ptr %194, align 8, !tbaa !12
  %196 = icmp sle i64 %190, %195
  br i1 %196, label %197, label %202

197:                                              ; preds = %189
  %198 = load i64, ptr %19, align 8, !tbaa !5
  %199 = add nsw i64 %198, 1
  store i64 %199, ptr %19, align 8, !tbaa !5
  %200 = load i64, ptr %21, align 8, !tbaa !5
  %201 = add nsw i64 %200, 1
  store i64 %201, ptr %21, align 8, !tbaa !5
  br label %205

202:                                              ; preds = %189, %184
  store i64 0, ptr %19, align 8, !tbaa !5
  store i64 1, ptr %21, align 8, !tbaa !5
  %203 = load i64, ptr %22, align 8, !tbaa !5
  %204 = add nsw i64 %203, 1
  store i64 %204, ptr %22, align 8, !tbaa !5
  br label %205

205:                                              ; preds = %202, %197
  br label %206

206:                                              ; preds = %205, %181
  br label %207

207:                                              ; preds = %206
  %208 = load i64, ptr %23, align 8, !tbaa !5
  %209 = add nsw i64 %208, 1
  store i64 %209, ptr %23, align 8, !tbaa !5
  br label %149, !llvm.loop !17

210:                                              ; preds = %153
  %211 = load i64, ptr %22, align 8, !tbaa !5
  %212 = add nsw i64 %211, 1
  %213 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %212)
          to label %214 unwind label %218

214:                                              ; preds = %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  store i32 0, ptr %16, align 4
  br label %215

215:                                              ; preds = %214, %110
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  %216 = load i32, ptr %16, align 4
  switch i32 %216, label %235 [
    i32 0, label %217
    i32 2, label %25
  ]

217:                                              ; preds = %215
  br label %25, !llvm.loop !14

218:                                              ; preds = %210
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %7, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %222

222:                                              ; preds = %218, %144, %123
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  br label %223

223:                                              ; preds = %222, %111, %97
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %224

224:                                              ; preds = %223, %81
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  br label %225

225:                                              ; preds = %224, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %226

226:                                              ; preds = %225, %63
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %227

227:                                              ; preds = %226, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %230

228:                                              ; preds = %25
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %229 = load i32, ptr %1, align 4
  ret i32 %229

230:                                              ; preds = %227
  %231 = load ptr, ptr %7, align 8
  %232 = load i32, ptr %8, align 4
  %233 = insertvalue { ptr, i32 } poison, ptr %231, 0
  %234 = insertvalue { ptr, i32 } %233, i32 %232, 1
  resume { ptr, i32 } %234

235:                                              ; preds = %215
  unreachable
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIllESaIS1_EE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIllESaIS1_EE4rendEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

declare i32 @puts(ptr noundef) #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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

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

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 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 %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca %"class.std::allocator.2", align 1
  %8 = alloca %"class.std::reverse_iterator", align 8
  %9 = alloca %"class.std::reverse_iterator", align 8
  %10 = alloca %"class.std::vector.0", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %13 = add nsw i64 %12, -1
  store i64 %13, ptr %1, align 8, !tbaa !5
  %.not77 = icmp eq i64 %12, 0
  br i1 %.not77, label %._crit_edge80, label %.lr.ph79

.lr.ph79:                                         ; preds = %0, %112
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %15 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %15, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %16 unwind label %21

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

._crit_edge:                                      ; preds = %31, %16
  %.051.lcssa = phi i64 [ 0, %16 ], [ %32, %31 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  %20 = load i64, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %36 unwind label %39

21:                                               ; preds = %.lr.ph79
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %118

.lr.ph:                                           ; preds = %16, %31
  %.04462 = phi i64 [ %33, %31 ], [ 0, %16 ]
  %.05161 = phi i64 [ %32, %31 ], [ 0, %16 ]
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04462) #6
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %23)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04462) #6
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %27 = icmp sgt i64 %.05161, %26
  br i1 %27, label %31, label %28

28:                                               ; preds = %.lr.ph
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04462) #6
  %30 = load i64, ptr %29, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %.lr.ph, %28
  %32 = phi i64 [ %30, %28 ], [ %.05161, %.lr.ph ]
  %33 = add nuw nsw i64 %.04462, 1
  %34 = load i64, ptr %2, align 8, !tbaa !5
  %35 = icmp slt i64 %33, %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !9

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

._crit_edge66:                                    ; preds = %.lr.ph65, %36
  call void @_ZNSt6vectorISt4pairIllESaIS1_EE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @_ZNSt6vectorISt4pairIllESaIS1_EE4rendEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  invoke void @_ZSt4sortISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS4_SaIS4_EEEEEEvT_SB_(ptr noundef nonnull %8, ptr noundef nonnull %9)
          to label %48 unwind label %54

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

.lr.ph65:                                         ; preds = %36, %.lr.ph65
  %.04363 = phi i64 [ %45, %.lr.ph65 ], [ 0, %36 ]
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.04363) #6
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.04363) #6
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %41, ptr noundef nonnull %43)
  %45 = add nuw nsw i64 %.04363, 1
  %46 = load i64, ptr %5, align 8, !tbaa !5
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %.lr.ph65, label %._crit_edge66, !llvm.loop !11

48:                                               ; preds = %._crit_edge66
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  %50 = load i64, ptr %49, align 8, !tbaa !12
  %51 = icmp sgt i64 %.051.lcssa, %50
  br i1 %51, label %52, label %56

52:                                               ; preds = %48
  %53 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %112, !llvm.loop !14

54:                                               ; preds = %._crit_edge66
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %116

56:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(16) %57)
          to label %.preheader60 unwind label %62

.preheader60:                                     ; preds = %56
  %58 = load i64, ptr %5, align 8, !tbaa !5
  %59 = icmp sgt i64 %58, 1
  br i1 %59, label %.lr.ph68, label %.preheader

.preheader:                                       ; preds = %72, %.preheader60
  %60 = load i64, ptr %2, align 8, !tbaa !5
  %61 = icmp sgt i64 %60, 0
  br i1 %61, label %.lr.ph74, label %._crit_edge75

62:                                               ; preds = %56
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %115

.lr.ph68:                                         ; preds = %.preheader60, %72
  %.04267 = phi i64 [ %73, %72 ], [ 1, %.preheader60 ]
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.04267) #6
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  %66 = load i64, ptr %65, align 8, !tbaa !15
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = load i64, ptr %68, align 8, !tbaa !15
  %.not55 = icmp sgt i64 %66, %69
  br i1 %.not55, label %70, label %72

70:                                               ; preds = %.lr.ph68
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.04267) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(16) %71)
          to label %72 unwind label %76

72:                                               ; preds = %70, %.lr.ph68
  %73 = add nuw nsw i64 %.04267, 1
  %74 = load i64, ptr %5, align 8, !tbaa !5
  %75 = icmp slt i64 %73, %74
  br i1 %75, label %.lr.ph68, label %.preheader, !llvm.loop !16

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

._crit_edge75:                                    ; preds = %108, %.preheader
  %.036.lcssa = phi i64 [ 0, %.preheader ], [ %.1, %108 ]
  %78 = add nsw i64 %.036.lcssa, 1
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %78)
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %112

.lr.ph74:                                         ; preds = %.preheader, %108
  %.073 = phi i64 [ %109, %108 ], [ 0, %.preheader ]
  %.03672 = phi i64 [ %.1, %108 ], [ 0, %.preheader ]
  %.03771 = phi i64 [ %.138, %108 ], [ 0, %.preheader ]
  %.03970 = phi i64 [ %87, %108 ], [ 0, %.preheader ]
  %.04069 = phi i64 [ %.141, %108 ], [ 0, %.preheader ]
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.073) #6
  %81 = load i64, ptr %80, align 8, !tbaa !5
  %82 = icmp sgt i64 %.03970, %81
  br i1 %82, label %86, label %83

83:                                               ; preds = %.lr.ph74
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.073) #6
  %85 = load i64, ptr %84, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %.lr.ph74, %83
  %87 = phi i64 [ %85, %83 ], [ %.03970, %.lr.ph74 ]
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.04069) #6
  %89 = load i64, ptr %88, align 8, !tbaa !12
  %.not53 = icmp sgt i64 %87, %89
  br i1 %.not53, label %97, label %90

90:                                               ; preds = %86
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.04069) #6
  %92 = getelementptr inbounds i8, ptr %91, i64 8
  %93 = load i64, ptr %92, align 8, !tbaa !15
  %94 = icmp slt i64 %.03771, %93
  br i1 %94, label %95, label %97

95:                                               ; preds = %90
  %96 = add nsw i64 %.03771, 1
  br label %108

97:                                               ; preds = %90, %86
  %98 = add nsw i64 %.04069, 1
  %99 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %100 = icmp ult i64 %98, %99
  br i1 %100, label %101, label %106

101:                                              ; preds = %97
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %98) #6
  %103 = load i64, ptr %102, align 8, !tbaa !12
  %.not54 = icmp sgt i64 %87, %103
  br i1 %.not54, label %106, label %104

104:                                              ; preds = %101
  %105 = add nsw i64 %.03771, 1
  br label %108

106:                                              ; preds = %101, %97
  %107 = add nsw i64 %.03672, 1
  br label %108

108:                                              ; preds = %95, %106, %104
  %.141 = phi i64 [ %.04069, %95 ], [ %98, %104 ], [ 0, %106 ]
  %.138 = phi i64 [ %96, %95 ], [ %105, %104 ], [ 1, %106 ]
  %.1 = phi i64 [ %.03672, %95 ], [ %.03672, %104 ], [ %107, %106 ]
  %109 = add nuw nsw i64 %.073, 1
  %110 = load i64, ptr %2, align 8, !tbaa !5
  %111 = icmp slt i64 %109, %110
  br i1 %111, label %.lr.ph74, label %._crit_edge75, !llvm.loop !17

112:                                              ; preds = %._crit_edge75, %52
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %113 = load i64, ptr %1, align 8, !tbaa !5
  %114 = add nsw i64 %113, -1
  store i64 %114, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %113, 0
  br i1 %.not, label %._crit_edge80, label %.lr.ph79

115:                                              ; preds = %76, %62
  %.pn = phi { ptr, i32 } [ %77, %76 ], [ %63, %62 ]
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %116

116:                                              ; preds = %115, %54
  %.pn.pn = phi { ptr, i32 } [ %.pn, %115 ], [ %55, %54 ]
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %117

117:                                              ; preds = %116, %39
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %116 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %118

118:                                              ; preds = %117, %21
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %117 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 24, 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.pn.pn

._crit_edge80:                                    ; preds = %112, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS4_SaIS4_EEEEEEvT_SB_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIllESaIS1_EE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIllESaIS1_EE4rendEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local 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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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