; LLVM IR from Izaron/ACM-ICPC :: Russian Olympiad in Informatics/Final Stage 2015 (monument)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca [2000005 x %"class.std::vector"], align 16
  %5 = alloca [2000005 x i64], align 16
  %6 = alloca [2000005 x i64], align 16
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"struct.std::pair", align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 48000120, ptr %4) #7
  %34 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i32 0, i32 0
  %35 = getelementptr inbounds %"class.std::vector", ptr %34, i64 2000005
  br label %36

36:                                               ; preds = %36, %0
  %37 = phi ptr [ %34, %0 ], [ %38, %36 ]
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #7
  %38 = getelementptr inbounds %"class.std::vector", ptr %37, i64 1
  %39 = icmp eq ptr %38, %35
  br i1 %39, label %40, label %36

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16000040, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 16000040, ptr %6) #7
  %41 = getelementptr inbounds [2000005 x i64], ptr %5, i64 0, i64 0
  %42 = getelementptr inbounds [2000005 x i64], ptr %5, i64 0, i64 0
  %43 = getelementptr inbounds i64, ptr %42, i64 2000005
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %41, ptr noundef %43, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %44 unwind label %61

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  %45 = getelementptr inbounds [2000005 x i64], ptr %6, i64 0, i64 0
  %46 = getelementptr inbounds [2000005 x i64], ptr %6, i64 0, i64 0
  %47 = getelementptr inbounds i64, ptr %46, i64 2000005
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %45, ptr noundef %47, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %48 unwind label %65

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  invoke void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %49 unwind label %69

49:                                               ; preds = %48
  %50 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 0
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %50)
          to label %52 unwind label %69

52:                                               ; preds = %49
  %53 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %55 unwind label %69

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %12, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 1, ptr %14, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %163, %55
  %57 = load i64, ptr %14, align 8, !tbaa !9
  %58 = load i64, ptr %2, align 8, !tbaa !9
  %59 = icmp sle i64 %57, %58
  br i1 %59, label %73, label %60

60:                                               ; preds = %56
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %167

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

65:                                               ; preds = %44
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %358

69:                                               ; preds = %52, %49, %48
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  br label %357

73:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  invoke void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %74 unwind label %81

74:                                               ; preds = %73
  %75 = load i64, ptr %14, align 8, !tbaa !9
  %76 = load i64, ptr %2, align 8, !tbaa !9
  %77 = icmp eq i64 %75, %76
  br i1 %77, label %78, label %85

78:                                               ; preds = %74
  %79 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %80 unwind label %81

80:                                               ; preds = %78
  br label %92

81:                                               ; preds = %157, %98, %88, %85, %78, %73
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %8, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %9, align 4
  br label %166

85:                                               ; preds = %74
  %86 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 0
  %87 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %86)
          to label %88 unwind label %81

88:                                               ; preds = %85
  %89 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 1
  %90 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %91 unwind label %81

91:                                               ; preds = %88
  br label %92

92:                                               ; preds = %91, %80
  %93 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 1
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %96 = load i64, ptr %95, align 8, !tbaa !11
  %97 = icmp eq i64 %94, %96
  br i1 %97, label %98, label %101

98:                                               ; preds = %92
  %99 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %100 unwind label %81

100:                                              ; preds = %98
  store i32 4, ptr %15, align 4
  br label %160

101:                                              ; preds = %92
  %102 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 1
  %105 = load i64, ptr %104, align 8, !tbaa !11
  %106 = icmp sgt i64 %103, %105
  br i1 %106, label %107, label %132

107:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %108 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %109 = load i64, ptr %108, align 8, !tbaa !11
  %110 = trunc i64 %109 to i32
  store i32 %110, ptr %17, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %124, %107
  %112 = load i32, ptr %17, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 1
  %115 = load i64, ptr %114, align 8, !tbaa !11
  %116 = icmp sgt i64 %113, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %111
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %131

118:                                              ; preds = %111
  %119 = load i32, ptr %17, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %120
  %122 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 0
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %121, ptr noundef nonnull align 8 dereferenceable(8) %122)
          to label %123 unwind label %127

123:                                              ; preds = %118
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %17, align 4, !tbaa !5
  %126 = add nsw i32 %125, -1
  store i32 %126, ptr %17, align 4, !tbaa !5
  br label %111, !llvm.loop !13

127:                                              ; preds = %118
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %8, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %166

131:                                              ; preds = %117
  br label %157

132:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %133 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 1
  %134 = load i64, ptr %133, align 8, !tbaa !11
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %18, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %149, %132
  %137 = load i32, ptr %18, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %140 = load i64, ptr %139, align 8, !tbaa !11
  %141 = icmp sgt i64 %138, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %136
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %156

143:                                              ; preds = %136
  %144 = load i32, ptr %18, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %145
  %147 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 0
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %146, ptr noundef nonnull align 8 dereferenceable(8) %147)
          to label %148 unwind label %152

148:                                              ; preds = %143
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %18, align 4, !tbaa !5
  %151 = add nsw i32 %150, -1
  store i32 %151, ptr %18, align 4, !tbaa !5
  br label %136, !llvm.loop !15

152:                                              ; preds = %143
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %8, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %166

156:                                              ; preds = %142
  br label %157

157:                                              ; preds = %156, %131
  %158 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %159 unwind label %81

159:                                              ; preds = %157
  store i32 0, ptr %15, align 4
  br label %160

160:                                              ; preds = %159, %100
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  %161 = load i32, ptr %15, align 4
  switch i32 %161, label %371 [
    i32 0, label %162
    i32 4, label %163
  ]

162:                                              ; preds = %160
  br label %163

163:                                              ; preds = %162, %160
  %164 = load i64, ptr %14, align 8, !tbaa !9
  %165 = add nsw i64 %164, 1
  store i64 %165, ptr %14, align 8, !tbaa !9
  br label %56, !llvm.loop !16

166:                                              ; preds = %152, %127, %81
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %356

167:                                              ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store i64 0, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %168

168:                                              ; preds = %248, %167
  %169 = load i64, ptr %21, align 8, !tbaa !9
  %170 = icmp slt i64 %169, 2000005
  br i1 %170, label %172, label %171

171:                                              ; preds = %168
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %260

172:                                              ; preds = %168
  %173 = load i64, ptr %21, align 8, !tbaa !9
  %174 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %173
  %175 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %174) #7
  %176 = icmp eq i64 %175, 0
  br i1 %176, label %177, label %178

177:                                              ; preds = %172
  br label %248

178:                                              ; preds = %172
  %179 = load i64, ptr %21, align 8, !tbaa !9
  %180 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %179
  %181 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %180) #7
  %182 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %181, ptr %182, align 8
  %183 = load i64, ptr %21, align 8, !tbaa !9
  %184 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %183
  %185 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %184) #7
  %186 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %185, ptr %186, align 8
  %187 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8
  %189 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEEvT_S7_(ptr %188, ptr %190)
          to label %191 unwind label %251

191:                                              ; preds = %178
  %192 = load i64, ptr %21, align 8, !tbaa !9
  %193 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %192
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %193, i64 noundef 0) #7
  %195 = load i64, ptr %194, align 8, !tbaa !9
  %196 = add nsw i64 %195, 1
  store i64 %196, ptr %194, align 8, !tbaa !9
  %197 = load i64, ptr %21, align 8, !tbaa !9
  %198 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %197
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %198, i64 noundef 0) #7
  %200 = load i64, ptr %199, align 8, !tbaa !9
  %201 = add nsw i64 %200, 4000010
  store i64 %201, ptr %199, align 8, !tbaa !9
  %202 = load i64, ptr %21, align 8, !tbaa !9
  %203 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %202
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %203, i64 noundef 1) #7
  %205 = load i64, ptr %204, align 8, !tbaa !9
  %206 = add nsw i64 %205, 4000010
  store i64 %206, ptr %204, align 8, !tbaa !9
  %207 = load i64, ptr %21, align 8, !tbaa !9
  %208 = load i64, ptr %21, align 8, !tbaa !9
  %209 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %208
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %209, i64 noundef 0) #7
  %211 = load i64, ptr %210, align 8, !tbaa !9
  %212 = sub nsw i64 %211, %207
  store i64 %212, ptr %210, align 8, !tbaa !9
  %213 = load i64, ptr %21, align 8, !tbaa !9
  %214 = load i64, ptr %21, align 8, !tbaa !9
  %215 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %214
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %215, i64 noundef 1) #7
  %217 = load i64, ptr %216, align 8, !tbaa !9
  %218 = sub nsw i64 %217, %213
  store i64 %218, ptr %216, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #7
  %219 = load i64, ptr %21, align 8, !tbaa !9
  %220 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %219
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %220, i64 noundef 0) #7
  %222 = load i64, ptr %21, align 8, !tbaa !9
  %223 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %222
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %223, i64 noundef 1) #7
  %225 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %221, ptr noundef nonnull align 8 dereferenceable(8) %224)
          to label %226 unwind label %255

226:                                              ; preds = %191
  %227 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 0
  %228 = extractvalue { i64, i64 } %225, 0
  store i64 %228, ptr %227, align 8
  %229 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 1
  %230 = extractvalue { i64, i64 } %225, 1
  store i64 %230, ptr %229, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %231 unwind label %255

231:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  %232 = load i64, ptr %21, align 8, !tbaa !9
  %233 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %232
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %233, i64 noundef 0) #7
  %235 = load i64, ptr %234, align 8, !tbaa !9
  %236 = load i64, ptr %3, align 8, !tbaa !9
  %237 = sdiv i64 %235, %236
  %238 = load i64, ptr %19, align 8, !tbaa !9
  %239 = add nsw i64 %238, %237
  store i64 %239, ptr %19, align 8, !tbaa !9
  %240 = load i64, ptr %21, align 8, !tbaa !9
  %241 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i64 0, i64 %240
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %241, i64 noundef 1) #7
  %243 = load i64, ptr %242, align 8, !tbaa !9
  %244 = load i64, ptr %3, align 8, !tbaa !9
  %245 = sdiv i64 %243, %244
  %246 = load i64, ptr %20, align 8, !tbaa !9
  %247 = add nsw i64 %246, %245
  store i64 %247, ptr %20, align 8, !tbaa !9
  br label %248

248:                                              ; preds = %231, %177
  %249 = load i64, ptr %21, align 8, !tbaa !9
  %250 = add nsw i64 %249, 1
  store i64 %250, ptr %21, align 8, !tbaa !9
  br label %168, !llvm.loop !17

251:                                              ; preds = %178
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %8, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %9, align 4
  br label %259

255:                                              ; preds = %226, %191
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %8, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  br label %259

259:                                              ; preds = %255, %251
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %355

260:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store i64 -1, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %261

261:                                              ; preds = %293, %260
  %262 = load i64, ptr %26, align 8, !tbaa !9
  %263 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %264 = icmp ult i64 %262, %263
  br i1 %264, label %266, label %265

265:                                              ; preds = %261
  store i32 14, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %296

266:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %267 = load i64, ptr %26, align 8, !tbaa !9
  %268 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %267) #7
  %269 = getelementptr inbounds %"struct.std::pair", ptr %268, i32 0, i32 0
  %270 = load i64, ptr %269, align 8, !tbaa !18
  store i64 %270, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %271 = load i64, ptr %26, align 8, !tbaa !9
  %272 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %271) #7
  %273 = getelementptr inbounds %"struct.std::pair", ptr %272, i32 0, i32 1
  %274 = load i64, ptr %273, align 8, !tbaa !11
  store i64 %274, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %275 = load i64, ptr %27, align 8, !tbaa !9
  %276 = load i64, ptr %3, align 8, !tbaa !9
  %277 = srem i64 %275, %276
  store i64 %277, ptr %29, align 8, !tbaa !9
  %278 = load i64, ptr %3, align 8, !tbaa !9
  %279 = load i64, ptr %29, align 8, !tbaa !9
  %280 = sub nsw i64 %278, %279
  %281 = getelementptr inbounds [2000005 x i64], ptr %5, i64 0, i64 %280
  %282 = load i64, ptr %281, align 8, !tbaa !9
  %283 = add nsw i64 %282, 1
  store i64 %283, ptr %281, align 8, !tbaa !9
  %284 = load i64, ptr %28, align 8, !tbaa !9
  %285 = load i64, ptr %3, align 8, !tbaa !9
  %286 = srem i64 %284, %285
  store i64 %286, ptr %29, align 8, !tbaa !9
  %287 = load i64, ptr %3, align 8, !tbaa !9
  %288 = load i64, ptr %29, align 8, !tbaa !9
  %289 = sub nsw i64 %287, %288
  %290 = getelementptr inbounds [2000005 x i64], ptr %6, i64 0, i64 %289
  %291 = load i64, ptr %290, align 8, !tbaa !9
  %292 = add nsw i64 %291, 1
  store i64 %292, ptr %290, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %293

293:                                              ; preds = %266
  %294 = load i64, ptr %26, align 8, !tbaa !9
  %295 = add nsw i64 %294, 1
  store i64 %295, ptr %26, align 8, !tbaa !9
  br label %261, !llvm.loop !19

296:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  store i64 -1, ptr %30, align 8, !tbaa !9
  br label %297

297:                                              ; preds = %333, %296
  %298 = load i64, ptr %30, align 8, !tbaa !9
  %299 = load i64, ptr %3, align 8, !tbaa !9
  %300 = icmp sle i64 %298, %299
  br i1 %300, label %302, label %301

301:                                              ; preds = %297
  store i32 17, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %336

302:                                              ; preds = %297
  %303 = load i64, ptr %30, align 8, !tbaa !9
  %304 = icmp sge i64 %303, 0
  br i1 %304, label %305, label %316

305:                                              ; preds = %302
  %306 = load i64, ptr %30, align 8, !tbaa !9
  %307 = getelementptr inbounds [2000005 x i64], ptr %5, i64 0, i64 %306
  %308 = load i64, ptr %307, align 8, !tbaa !9
  %309 = load i64, ptr %19, align 8, !tbaa !9
  %310 = add nsw i64 %309, %308
  store i64 %310, ptr %19, align 8, !tbaa !9
  %311 = load i64, ptr %30, align 8, !tbaa !9
  %312 = getelementptr inbounds [2000005 x i64], ptr %6, i64 0, i64 %311
  %313 = load i64, ptr %312, align 8, !tbaa !9
  %314 = load i64, ptr %20, align 8, !tbaa !9
  %315 = add nsw i64 %314, %313
  store i64 %315, ptr %20, align 8, !tbaa !9
  br label %316

316:                                              ; preds = %305, %302
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %317 = load i64, ptr %20, align 8, !tbaa !9
  %318 = load i64, ptr %19, align 8, !tbaa !9
  %319 = sub nsw i64 %317, %318
  store i64 %319, ptr %31, align 8, !tbaa !9
  %320 = load i64, ptr %25, align 8, !tbaa !9
  %321 = icmp eq i64 %320, -1
  br i1 %321, label %322, label %324

322:                                              ; preds = %316
  %323 = load i64, ptr %31, align 8, !tbaa !9
  store i64 %323, ptr %25, align 8, !tbaa !9
  br label %332

324:                                              ; preds = %316
  %325 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %326 unwind label %328

326:                                              ; preds = %324
  %327 = load i64, ptr %325, align 8, !tbaa !9
  store i64 %327, ptr %25, align 8, !tbaa !9
  br label %332

328:                                              ; preds = %324
  %329 = landingpad { ptr, i32 }
          cleanup
  %330 = extractvalue { ptr, i32 } %329, 0
  store ptr %330, ptr %8, align 8
  %331 = extractvalue { ptr, i32 } %329, 1
  store i32 %331, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %354

332:                                              ; preds = %326, %322
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %333

333:                                              ; preds = %332
  %334 = load i64, ptr %30, align 8, !tbaa !9
  %335 = add nsw i64 %334, 1
  store i64 %335, ptr %30, align 8, !tbaa !9
  br label %297, !llvm.loop !20

336:                                              ; preds = %301
  %337 = load i64, ptr %25, align 8, !tbaa !9
  %338 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %339 = add nsw i64 %337, %338
  %340 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %339)
          to label %341 unwind label %350

341:                                              ; preds = %336
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16000040, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16000040, ptr %5) #7
  %342 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i32 0, i32 0
  %343 = getelementptr inbounds %"class.std::vector", ptr %342, i64 2000005
  br label %344

344:                                              ; preds = %344, %341
  %345 = phi ptr [ %343, %341 ], [ %346, %344 ]
  %346 = getelementptr inbounds %"class.std::vector", ptr %345, i64 -1
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %346) #7
  %347 = icmp eq ptr %346, %342
  br i1 %347, label %348, label %344

348:                                              ; preds = %344
  call void @llvm.lifetime.end.p0(i64 48000120, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %349 = load i32, ptr %1, align 4
  ret i32 %349

350:                                              ; preds = %336
  %351 = landingpad { ptr, i32 }
          cleanup
  %352 = extractvalue { ptr, i32 } %351, 0
  store ptr %352, ptr %8, align 8
  %353 = extractvalue { ptr, i32 } %351, 1
  store i32 %353, ptr %9, align 4
  br label %354

354:                                              ; preds = %350, %328
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %355

355:                                              ; preds = %354, %259
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %356

356:                                              ; preds = %355, %166
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  br label %357

357:                                              ; preds = %356, %69
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %358

358:                                              ; preds = %357, %65, %61
  call void @llvm.lifetime.end.p0(i64 16000040, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16000040, ptr %5) #7
  %359 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %4, i32 0, i32 0
  %360 = getelementptr inbounds %"class.std::vector", ptr %359, i64 2000005
  br label %361

361:                                              ; preds = %361, %358
  %362 = phi ptr [ %360, %358 ], [ %363, %361 ]
  %363 = getelementptr inbounds %"class.std::vector", ptr %362, i64 -1
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %363) #7
  %364 = icmp eq ptr %363, %359
  br i1 %364, label %365, label %361

365:                                              ; preds = %361
  call void @llvm.lifetime.end.p0(i64 48000120, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %366

366:                                              ; preds = %365
  %367 = load ptr, ptr %8, align 8
  %368 = load i32, ptr %9, align 4
  %369 = insertvalue { ptr, i32 } poison, ptr %367, 0
  %370 = insertvalue { ptr, i32 } %369, i32 %368, 1
  resume { ptr, i32 } %370

371:                                              ; preds = %160
  unreachable
}

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

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

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

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

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 void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { 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 #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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca [2000005 x %"class.std::vector"], align 16
  %4 = alloca [2000005 x i64], align 16
  %5 = alloca [2000005 x i64], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 48000120, ptr nonnull %3) #7
  br label %17

17:                                               ; preds = %17, %0
  %.idx = phi i64 [ 0, %0 ], [ %.add, %17 ]
  %.ptr = getelementptr inbounds i8, ptr %3, i64 %.idx
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr) #7
  %.add = add nuw nsw i64 %.idx, 24
  %18 = icmp eq i64 %.add, 48000120
  br i1 %18, label %19, label %17

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %3, i64 48000120
  call void @llvm.lifetime.start.p0(i64 16000040, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 16000040, ptr nonnull %5) #7
  %21 = getelementptr inbounds i8, ptr %4, i64 16000040
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %4, ptr noundef nonnull %21, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %22 unwind label %33

22:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %23 = getelementptr inbounds i8, ptr %5, i64 16000040
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %5, ptr noundef nonnull %23, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %24 unwind label %35

24:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %25 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %26 unwind label %37

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %9, i64 8
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %29 unwind label %37

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %9, i64 16, i1 false)
  %30 = load i64, ptr %1, align 8, !tbaa !9
  %.not92 = icmp slt i64 %30, 1
  br i1 %.not92, label %.preheader83, label %.lr.ph94

.lr.ph94:                                         ; preds = %29
  %31 = getelementptr inbounds i8, ptr %11, i64 8
  br label %39

.preheader83:                                     ; preds = %.loopexit, %29
  %32 = getelementptr inbounds i8, ptr %12, i64 8
  br label %80

33:                                               ; preds = %19
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %178

35:                                               ; preds = %22
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  br label %178

37:                                               ; preds = %26, %24
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %177

39:                                               ; preds = %.lr.ph94, %.loopexit
  %.05493 = phi i64 [ 1, %.lr.ph94 ], [ %75, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %40 = load i64, ptr %1, align 8, !tbaa !9
  %41 = icmp eq i64 %.05493, %40
  br i1 %41, label %42, label %46

42:                                               ; preds = %39
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %10)
  br label %50

44:                                               ; preds = %48, %46
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %77

46:                                               ; preds = %39
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %48 unwind label %44

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %50 unwind label %44

50:                                               ; preds = %48, %42
  %51 = load i64, ptr %31, align 8, !tbaa !11
  %52 = load i64, ptr %27, align 8, !tbaa !11
  %53 = icmp eq i64 %51, %52
  br i1 %53, label %.loopexit, label %54

54:                                               ; preds = %50
  %55 = icmp sgt i64 %52, %51
  br i1 %55, label %56, label %65

56:                                               ; preds = %54
  %sext105 = shl i64 %52, 32
  %57 = ashr exact i64 %sext105, 32
  %58 = icmp slt i64 %51, %57
  br i1 %58, label %.lr.ph91, label %.loopexit

.lr.ph91:                                         ; preds = %56, %60
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %60 ], [ %57, %56 ]
  %59 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %3, i64 0, i64 %indvars.iv108
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %60 unwind label %63

60:                                               ; preds = %.lr.ph91
  %indvars.iv.next109 = add nsw i64 %indvars.iv108, -1
  %61 = load i64, ptr %31, align 8, !tbaa !11
  %62 = icmp slt i64 %61, %indvars.iv.next109
  br i1 %62, label %.lr.ph91, label %.loopexit, !llvm.loop !13

63:                                               ; preds = %.lr.ph91
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %77

65:                                               ; preds = %54
  %sext = shl i64 %51, 32
  %66 = ashr exact i64 %sext, 32
  %67 = icmp slt i64 %52, %66
  br i1 %67, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %65, %69
  %indvars.iv = phi i64 [ %indvars.iv.next, %69 ], [ %66, %65 ]
  %68 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %3, i64 0, i64 %indvars.iv
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %69 unwind label %72

69:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %70 = load i64, ptr %27, align 8, !tbaa !11
  %71 = icmp slt i64 %70, %indvars.iv.next
  br i1 %71, label %.lr.ph, label %.loopexit, !llvm.loop !15

72:                                               ; preds = %.lr.ph
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %77

.loopexit:                                        ; preds = %69, %60, %56, %65, %50
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  %75 = add nuw nsw i64 %.05493, 1
  %76 = load i64, ptr %1, align 8, !tbaa !9
  %.not.not = icmp slt i64 %.05493, %76
  br i1 %.not.not, label %39, label %.preheader83, !llvm.loop !16

77:                                               ; preds = %72, %63, %44
  %.pn78 = phi { ptr, i32 } [ %64, %63 ], [ %73, %72 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %176

78:                                               ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  store i64 -1, ptr %13, align 8, !tbaa !9
  %79 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %.not = icmp eq i64 %79, 0
  br i1 %.not, label %.preheader, label %.lr.ph99

80:                                               ; preds = %.preheader83, %120
  %.05797 = phi i64 [ 0, %.preheader83 ], [ %121, %120 ]
  %.05896 = phi i64 [ 0, %.preheader83 ], [ %.159, %120 ]
  %.06295 = phi i64 [ 0, %.preheader83 ], [ %.163, %120 ]
  %81 = getelementptr inbounds [2000005 x %"class.std::vector"], ptr %3, i64 0, i64 %.05797
  %82 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #7
  %83 = icmp eq i64 %82, 0
  br i1 %83, label %120, label %84

84:                                               ; preds = %80
  %85 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #7
  %86 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEEvT_S7_(ptr %85, ptr %86)
          to label %87 unwind label %122

87:                                               ; preds = %84
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 0) #7
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = add nsw i64 %89, 1
  store i64 %90, ptr %88, align 8, !tbaa !9
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 0) #7
  %92 = load i64, ptr %91, align 8, !tbaa !9
  %93 = add nsw i64 %92, 4000010
  store i64 %93, ptr %91, align 8, !tbaa !9
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 1) #7
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = add nsw i64 %95, 4000010
  store i64 %96, ptr %94, align 8, !tbaa !9
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 0) #7
  %98 = load i64, ptr %97, align 8, !tbaa !9
  %99 = sub nsw i64 %98, %.05797
  store i64 %99, ptr %97, align 8, !tbaa !9
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 1) #7
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = sub nsw i64 %101, %.05797
  store i64 %102, ptr %100, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 0) #7
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 1) #7
  %105 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef nonnull align 8 dereferenceable(8) %104)
          to label %106 unwind label %124

106:                                              ; preds = %87
  %107 = extractvalue { i64, i64 } %105, 0
  store i64 %107, ptr %12, align 8
  %108 = extractvalue { i64, i64 } %105, 1
  store i64 %108, ptr %32, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %109 unwind label %124

109:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 0) #7
  %111 = load i64, ptr %110, align 8, !tbaa !9
  %112 = load i64, ptr %2, align 8, !tbaa !9
  %113 = sdiv i64 %111, %112
  %114 = add nsw i64 %113, %.06295
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 1) #7
  %116 = load i64, ptr %115, align 8, !tbaa !9
  %117 = load i64, ptr %2, align 8, !tbaa !9
  %118 = sdiv i64 %116, %117
  %119 = add nsw i64 %118, %.05896
  br label %120

120:                                              ; preds = %80, %109
  %.163 = phi i64 [ %.06295, %80 ], [ %114, %109 ]
  %.159 = phi i64 [ %.05896, %80 ], [ %119, %109 ]
  %121 = add nuw nsw i64 %.05797, 1
  %exitcond.not = icmp eq i64 %121, 2000005
  br i1 %exitcond.not, label %78, label %80, !llvm.loop !17

122:                                              ; preds = %84
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %176

124:                                              ; preds = %106, %87
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  br label %176

.preheader:                                       ; preds = %.lr.ph99, %78
  %126 = load i64, ptr %2, align 8, !tbaa !9
  %.not75100 = icmp slt i64 %126, -1
  br i1 %.not75100, label %._crit_edge, label %127

127:                                              ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %128 = sub nsw i64 %.159, %.163
  store i64 %128, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  %.not75.not.peel = icmp sgt i64 %126, -1
  br i1 %.not75.not.peel, label %.lr.ph104.peel.next, label %._crit_edge

.lr.ph99:                                         ; preds = %78, %.lr.ph99
  %.05598 = phi i64 [ %145, %.lr.ph99 ], [ 0, %78 ]
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.05598) #7
  %130 = load i64, ptr %129, align 8, !tbaa !18
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.05598) #7
  %132 = getelementptr inbounds i8, ptr %131, i64 8
  %133 = load i64, ptr %132, align 8, !tbaa !11
  %134 = load i64, ptr %2, align 8, !tbaa !9
  %135 = srem i64 %130, %134
  %136 = sub nsw i64 %134, %135
  %137 = getelementptr inbounds [2000005 x i64], ptr %4, i64 0, i64 %136
  %138 = load i64, ptr %137, align 8, !tbaa !9
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %137, align 8, !tbaa !9
  %140 = srem i64 %133, %134
  %141 = sub nsw i64 %134, %140
  %142 = getelementptr inbounds [2000005 x i64], ptr %5, i64 0, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !9
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %142, align 8, !tbaa !9
  %145 = add nuw nsw i64 %.05598, 1
  %146 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %147 = icmp ult i64 %145, %146
  br i1 %147, label %.lr.ph99, label %.preheader, !llvm.loop !19

._crit_edge:                                      ; preds = %165, %127, %.preheader
  %148 = phi i64 [ -1, %.preheader ], [ %128, %127 ], [ %storemerge, %165 ]
  %149 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %150 = add nsw i64 %149, %148
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %150)
          to label %168 unwind label %174

.lr.ph104.peel.next:                              ; preds = %127, %165
  %152 = phi i64 [ %166, %165 ], [ %126, %127 ]
  %153 = phi i64 [ %storemerge, %165 ], [ %128, %127 ]
  %.0103 = phi i64 [ %167, %165 ], [ 0, %127 ]
  %.260102 = phi i64 [ %159, %165 ], [ %.159, %127 ]
  %.264101 = phi i64 [ %156, %165 ], [ %.163, %127 ]
  %154 = getelementptr inbounds [2000005 x i64], ptr %4, i64 0, i64 %.0103
  %155 = load i64, ptr %154, align 8, !tbaa !9
  %156 = add nsw i64 %155, %.264101
  %157 = getelementptr inbounds [2000005 x i64], ptr %5, i64 0, i64 %.0103
  %158 = load i64, ptr %157, align 8, !tbaa !9
  %159 = add nsw i64 %158, %.260102
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %160 = sub nsw i64 %159, %156
  store i64 %160, ptr %14, align 8, !tbaa !9
  %161 = icmp eq i64 %153, -1
  br i1 %161, label %165, label %162

162:                                              ; preds = %.lr.ph104.peel.next
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %164 = load i64, ptr %163, align 8, !tbaa !9
  %.pre = load i64, ptr %2, align 8, !tbaa !9
  br label %165

165:                                              ; preds = %.lr.ph104.peel.next, %162
  %166 = phi i64 [ %.pre, %162 ], [ %152, %.lr.ph104.peel.next ]
  %storemerge = phi i64 [ %164, %162 ], [ %160, %.lr.ph104.peel.next ]
  store i64 %storemerge, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  %167 = add nuw nsw i64 %.0103, 1
  %.not75.not = icmp slt i64 %.0103, %166
  br i1 %.not75.not, label %.lr.ph104.peel.next, label %._crit_edge, !llvm.loop !20

168:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16000040, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16000040, ptr nonnull %4) #7
  br label %169

169:                                              ; preds = %169, %168
  %170 = phi ptr [ %20, %168 ], [ %171, %169 ]
  %171 = getelementptr inbounds i8, ptr %170, i64 -24
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %171) #7
  %172 = icmp eq ptr %171, %3
  br i1 %172, label %173, label %169

173:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 48000120, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

174:                                              ; preds = %._crit_edge
  %175 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %176

176:                                              ; preds = %174, %124, %122, %77
  %.pn78.pn = phi { ptr, i32 } [ %.pn78, %77 ], [ %175, %174 ], [ %125, %124 ], [ %123, %122 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %177

177:                                              ; preds = %176, %37
  %.pn78.pn.pn = phi { ptr, i32 } [ %.pn78.pn, %176 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %178

178:                                              ; preds = %177, %35, %33
  %.pn78.pn.pn.pn = phi { ptr, i32 } [ %.pn78.pn.pn, %177 ], [ %36, %35 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 16000040, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16000040, ptr nonnull %4) #7
  br label %179

179:                                              ; preds = %179, %178
  %180 = phi ptr [ %20, %178 ], [ %181, %179 ]
  %181 = getelementptr inbounds i8, ptr %180, i64 -24
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %181) #7
  %182 = icmp eq ptr %181, %3
  br i1 %182, label %183, label %179

183:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 48000120, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn78.pn.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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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 void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { 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 #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 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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