; LLVM IR from eyangch/competitive-programming :: USACOcontests/platinum/2023.01/subtree_activation.ll (Z3dfsx)

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

@N = external dso_local global i64, align 8
@G = external dso_local global [200000 x %"class.std::vector"], align 16
@dp = external dso_local global [200000 x [2 x i64]], align 16
@st = external dso_local global [200000 x i64], align 16

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsx(i64 noundef %0) #3 personality ptr @__gxx_personality_v0 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::pair", align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %33 = alloca %"struct.std::greater", align 1
  %34 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %36 = alloca %"struct.std::greater", align 1
  %37 = alloca %"struct.std::pair", align 8
  %38 = alloca i32, align 4
  %39 = alloca i64, align 8
  %40 = alloca %"struct.std::pair", align 8
  %41 = alloca i32, align 4
  %42 = alloca i64, align 8
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i64, align 8
  %46 = alloca i64, align 8
  store i64 %0, ptr %2, align 8, !tbaa !5
  %47 = load i64, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %47
  %49 = getelementptr inbounds [2 x i64], ptr %48, i64 0, i64 0
  store i64 2, ptr %49, align 16, !tbaa !5
  %50 = load i64, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %50
  %52 = getelementptr inbounds [2 x i64], ptr %51, i64 0, i64 1
  store i64 1, ptr %52, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %53 = load i64, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @G, i64 0, i64 %53
  store ptr %54, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %55 = load ptr, ptr %3, align 8, !tbaa !9
  %56 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #5
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %56, ptr %57, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %58 = load ptr, ptr %3, align 8, !tbaa !9
  %59 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #5
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  br label %61

61:                                               ; preds = %68, %1
  %62 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %62, label %64, label %63

63:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %70

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %66 = load i64, ptr %65, align 8, !tbaa !5
  store i64 %66, ptr %6, align 8, !tbaa !5
  %67 = load i64, ptr %6, align 8, !tbaa !5
  call void @_Z3dfsx(i64 noundef %67)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %68

68:                                               ; preds = %64
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %61

70:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %71 = load i64, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @G, i64 0, i64 %71
  store ptr %72, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %73 = load ptr, ptr %8, align 8, !tbaa !9
  %74 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #5
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %76 = load ptr, ptr %8, align 8, !tbaa !9
  %77 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #5
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  br label %79

79:                                               ; preds = %107, %70
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %80, label %82, label %81

81:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %109

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %84 = load i64, ptr %83, align 8, !tbaa !5
  store i64 %84, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %85 = load i64, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %85
  %87 = getelementptr inbounds [2 x i64], ptr %86, i64 0, i64 0
  %88 = load i64, ptr %87, align 16, !tbaa !5
  %89 = load i64, ptr %11, align 8, !tbaa !5
  %90 = getelementptr inbounds [200000 x i64], ptr @st, i64 0, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !5
  %92 = add nsw i64 %88, %91
  store i64 %92, ptr %12, align 8, !tbaa !5
  %93 = load i64, ptr %12, align 8, !tbaa !5
  %94 = load i64, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %94
  %96 = getelementptr inbounds [2 x i64], ptr %95, i64 0, i64 1
  %97 = load i64, ptr %96, align 8, !tbaa !5
  %98 = add nsw i64 %97, %93
  store i64 %98, ptr %96, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %99 = load i64, ptr %12, align 8, !tbaa !5
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %100
  %102 = getelementptr inbounds [2 x i64], ptr %101, i64 0, i64 1
  %103 = load i64, ptr %102, align 8, !tbaa !5
  %104 = sub nsw i64 %99, %103
  store i64 %104, ptr %13, align 8, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %106 = load i64, ptr %105, align 8, !tbaa !5
  store i64 %106, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %107

107:                                              ; preds = %82
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %79

109:                                              ; preds = %81
  %110 = load i64, ptr %7, align 8, !tbaa !5
  %111 = load i64, ptr %2, align 8, !tbaa !5
  %112 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %111
  %113 = getelementptr inbounds [2 x i64], ptr %112, i64 0, i64 1
  %114 = load i64, ptr %113, align 8, !tbaa !5
  %115 = sub nsw i64 %114, %110
  store i64 %115, ptr %113, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %116 = load i64, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @G, i64 0, i64 %116
  store ptr %117, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %118 = load ptr, ptr %16, align 8, !tbaa !9
  %119 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %118) #5
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %119, ptr %120, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %121 = load ptr, ptr %16, align 8, !tbaa !9
  %122 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %121) #5
  %123 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %122, ptr %123, align 8
  br label %124

124:                                              ; preds = %171, %109
  %125 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br i1 %125, label %127, label %126

126:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %182

127:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %129 = load i64, ptr %128, align 8, !tbaa !5
  store i64 %129, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %130 = load i64, ptr %19, align 8, !tbaa !5
  %131 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %130
  %132 = getelementptr inbounds [2 x i64], ptr %131, i64 0, i64 0
  %133 = load i64, ptr %132, align 16, !tbaa !5
  %134 = load i64, ptr %19, align 8, !tbaa !5
  %135 = getelementptr inbounds [200000 x i64], ptr @st, i64 0, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !5
  %137 = mul nsw i64 2, %136
  %138 = add nsw i64 %133, %137
  store i64 %138, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %139 = load i64, ptr %19, align 8, !tbaa !5
  %140 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %139
  %141 = getelementptr inbounds [2 x i64], ptr %140, i64 0, i64 1
  %142 = load i64, ptr %141, align 8, !tbaa !5
  %143 = load i64, ptr %19, align 8, !tbaa !5
  %144 = getelementptr inbounds [200000 x i64], ptr @st, i64 0, i64 %143
  %145 = load i64, ptr %144, align 8, !tbaa !5
  %146 = add nsw i64 %142, %145
  store i64 %146, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %147 = load i64, ptr %19, align 8, !tbaa !5
  %148 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %147
  %149 = getelementptr inbounds [2 x i64], ptr %148, i64 0, i64 0
  %150 = load i64, ptr %149, align 16, !tbaa !5
  store i64 %150, ptr %22, align 8, !tbaa !5
  %151 = load i64, ptr %20, align 8, !tbaa !5
  %152 = load i64, ptr %2, align 8, !tbaa !5
  %153 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %152
  %154 = getelementptr inbounds [2 x i64], ptr %153, i64 0, i64 0
  %155 = load i64, ptr %154, align 16, !tbaa !5
  %156 = add nsw i64 %155, %151
  store i64 %156, ptr %154, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  store i64 0, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %157 = load i64, ptr %20, align 8, !tbaa !5
  %158 = load i64, ptr %21, align 8, !tbaa !5
  %159 = sub nsw i64 %157, %158
  store i64 %159, ptr %25, align 8, !tbaa !5
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %161 unwind label %173

161:                                              ; preds = %127
  invoke void @_ZNSt4pairIxxEC2IRKxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %162 unwind label %173

162:                                              ; preds = %161
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %163 unwind label %173

163:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  store i64 0, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %164 = load i64, ptr %20, align 8, !tbaa !5
  %165 = load i64, ptr %22, align 8, !tbaa !5
  %166 = sub nsw i64 %164, %165
  store i64 %166, ptr %30, align 8, !tbaa !5
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %168 unwind label %177

168:                                              ; preds = %163
  invoke void @_ZNSt4pairIxxEC2IRKxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %169 unwind label %177

169:                                              ; preds = %168
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %170 unwind label %177

170:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %171

171:                                              ; preds = %170
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  br label %124

173:                                              ; preds = %162, %161, %127
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %26, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %181

177:                                              ; preds = %169, %168, %163
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %26, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  br label %181

181:                                              ; preds = %177, %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %300

182:                                              ; preds = %126
  %183 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %184 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %31, i32 0, i32 0
  store ptr %183, ptr %184, align 8
  %185 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %186 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %32, i32 0, i32 0
  store ptr %185, ptr %186, align 8
  %187 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %31, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8
  %189 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %32, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS3_SaIS3_EEEESt7greaterIS3_EEvT_SB_T0_(ptr %188, ptr %190)
          to label %191 unwind label %210

191:                                              ; preds = %182
  %192 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %193 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %34, i32 0, i32 0
  store ptr %192, ptr %193, align 8
  %194 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %195 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %35, i32 0, i32 0
  store ptr %194, ptr %195, align 8
  %196 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %34, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8
  %198 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %35, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS3_SaIS3_EEEESt7greaterIS3_EEvT_SB_T0_(ptr %197, ptr %199)
          to label %200 unwind label %210

200:                                              ; preds = %191
  br label %201

201:                                              ; preds = %209, %200
  %202 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %203 = icmp ult i64 %202, 2
  br i1 %203, label %204, label %218

204:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  store i32 0, ptr %38, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  %205 = load i64, ptr @N, align 8, !tbaa !5
  %206 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %207 = add i64 %205, %206
  store i64 %207, ptr %39, align 8, !tbaa !5
  invoke void @_ZNSt4pairIxxEC2IiyTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %208 unwind label %214

208:                                              ; preds = %204
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %37)
          to label %209 unwind label %214

209:                                              ; preds = %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #5
  br label %201, !llvm.loop !13

210:                                              ; preds = %191, %182
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %26, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %27, align 4
  br label %300

214:                                              ; preds = %208, %204
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %26, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #5
  br label %300

218:                                              ; preds = %201
  br label %219

219:                                              ; preds = %228, %218
  %220 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %221 = icmp ult i64 %220, 2
  br i1 %221, label %222, label %233

222:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #5
  store i32 0, ptr %41, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  %223 = load i64, ptr @N, align 8, !tbaa !5
  %224 = add nsw i64 %223, 10
  %225 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %226 = add i64 %224, %225
  store i64 %226, ptr %42, align 8, !tbaa !5
  invoke void @_ZNSt4pairIxxEC2IiyTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %227 unwind label %229

227:                                              ; preds = %222
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(16) %40)
          to label %228 unwind label %229

228:                                              ; preds = %227
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  br label %219, !llvm.loop !15

229:                                              ; preds = %227, %222
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %26, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  br label %300

233:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  %234 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 0) #5
  %235 = getelementptr inbounds %"struct.std::pair", ptr %234, i32 0, i32 0
  %236 = load i64, ptr %235, align 8, !tbaa !16
  store i64 %236, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #5
  %237 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0) #5
  %238 = getelementptr inbounds %"struct.std::pair", ptr %237, i32 0, i32 0
  %239 = load i64, ptr %238, align 8, !tbaa !16
  %240 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 1) #5
  %241 = getelementptr inbounds %"struct.std::pair", ptr %240, i32 0, i32 0
  %242 = load i64, ptr %241, align 8, !tbaa !16
  %243 = add nsw i64 %239, %242
  store i64 %243, ptr %44, align 8, !tbaa !5
  %244 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %44)
          to label %245 unwind label %287

245:                                              ; preds = %233
  %246 = load i64, ptr %244, align 8, !tbaa !5
  store i64 %246, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #5
  %247 = load i64, ptr %43, align 8, !tbaa !5
  %248 = load i64, ptr %2, align 8, !tbaa !5
  %249 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %248
  %250 = getelementptr inbounds [2 x i64], ptr %249, i64 0, i64 0
  %251 = load i64, ptr %250, align 16, !tbaa !5
  %252 = sub nsw i64 %251, %247
  store i64 %252, ptr %250, align 16, !tbaa !5
  %253 = load i64, ptr %2, align 8, !tbaa !5
  %254 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %253
  %255 = getelementptr inbounds [2 x i64], ptr %254, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #5
  %256 = load i64, ptr %2, align 8, !tbaa !5
  %257 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %256
  %258 = getelementptr inbounds [2 x i64], ptr %257, i64 0, i64 1
  %259 = load i64, ptr %258, align 8, !tbaa !5
  %260 = load i64, ptr %2, align 8, !tbaa !5
  %261 = getelementptr inbounds [200000 x i64], ptr @st, i64 0, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !5
  %263 = add nsw i64 %259, %262
  store i64 %263, ptr %45, align 8, !tbaa !5
  %264 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %255, ptr noundef nonnull align 8 dereferenceable(8) %45)
          to label %265 unwind label %291

265:                                              ; preds = %245
  %266 = load i64, ptr %264, align 8, !tbaa !5
  %267 = load i64, ptr %2, align 8, !tbaa !5
  %268 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %267
  %269 = getelementptr inbounds [2 x i64], ptr %268, i64 0, i64 0
  store i64 %266, ptr %269, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #5
  %270 = load i64, ptr %2, align 8, !tbaa !5
  %271 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %270
  %272 = getelementptr inbounds [2 x i64], ptr %271, i64 0, i64 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #5
  %273 = load i64, ptr %2, align 8, !tbaa !5
  %274 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %273
  %275 = getelementptr inbounds [2 x i64], ptr %274, i64 0, i64 0
  %276 = load i64, ptr %275, align 16, !tbaa !5
  %277 = load i64, ptr %2, align 8, !tbaa !5
  %278 = getelementptr inbounds [200000 x i64], ptr @st, i64 0, i64 %277
  %279 = load i64, ptr %278, align 8, !tbaa !5
  %280 = add nsw i64 %276, %279
  store i64 %280, ptr %46, align 8, !tbaa !5
  %281 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %272, ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %282 unwind label %295

282:                                              ; preds = %265
  %283 = load i64, ptr %281, align 8, !tbaa !5
  %284 = load i64, ptr %2, align 8, !tbaa !5
  %285 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %284
  %286 = getelementptr inbounds [2 x i64], ptr %285, i64 0, i64 1
  store i64 %283, ptr %286, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

287:                                              ; preds = %233
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %26, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #5
  br label %299

291:                                              ; preds = %245
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %26, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #5
  br label %299

295:                                              ; preds = %265
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %26, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  br label %299

299:                                              ; preds = %295, %291, %287
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  br label %300

300:                                              ; preds = %299, %229, %214, %210, %181
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %301

301:                                              ; preds = %300
  %302 = load ptr, ptr %26, align 8
  %303 = load i32, ptr %27, align 4
  %304 = insertvalue { ptr, i32 } poison, ptr %302, 0
  %305 = insertvalue { ptr, i32 } %304, i32 %303, 1
  resume { ptr, i32 } %305
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 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)) #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IiyTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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) #1 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)) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #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 = { 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 long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSSt4pairIxxE", !6, i64 0, !6, i64 8}


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

@N = external dso_local local_unnamed_addr global i64, align 8
@G = external dso_local global [200000 x %"class.std::vector"], align 16
@dp = external dso_local global [200000 x [2 x i64]], align 16
@st = external dso_local local_unnamed_addr global [200000 x i64], align 16

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(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 nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsx(i64 noundef %0) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %0
  store i64 2, ptr %29, align 16, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  store i64 1, ptr %30, align 8, !tbaa !5
  %31 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @G, i64 0, i64 %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %32 = tail call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  store ptr %32, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %33 = tail call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  store ptr %33, ptr %3, align 8
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %34, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %35 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  store ptr %35, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %36 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  store ptr %36, ptr %6, align 8
  %37 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %37, label %.lr.ph46, label %._crit_edge47

.lr.ph:                                           ; preds = %1, %.lr.ph
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %39 = load i64, ptr %38, align 8, !tbaa !5
  call void @_Z3dfsx(i64 noundef %39)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %41, label %.lr.ph, label %._crit_edge

._crit_edge47.loopexit:                           ; preds = %.lr.ph46
  %.pre = load i64, ptr %4, align 8, !tbaa !5
  br label %._crit_edge47

._crit_edge47:                                    ; preds = %._crit_edge47.loopexit, %._crit_edge
  %42 = phi i64 [ %.pre, %._crit_edge47.loopexit ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %43 = load i64, ptr %30, align 8, !tbaa !5
  %44 = sub nsw i64 %43, %42
  store i64 %44, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %45 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  store ptr %45, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %46 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  store ptr %46, ptr %11, align 8
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %47, label %.lr.ph49, label %._crit_edge50

.lr.ph46:                                         ; preds = %._crit_edge, %.lr.ph46
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %50 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %49
  %51 = load i64, ptr %50, align 16, !tbaa !5
  %52 = getelementptr inbounds [200000 x i64], ptr @st, i64 0, i64 %49
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = add nsw i64 %53, %51
  %55 = load i64, ptr %30, align 8, !tbaa !5
  %56 = add nsw i64 %55, %54
  store i64 %56, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %57 = getelementptr inbounds i8, ptr %50, i64 8
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = sub nsw i64 %54, %58
  store i64 %59, ptr %7, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %61 = load i64, ptr %60, align 8, !tbaa !5
  store i64 %61, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %63 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %63, label %.lr.ph46, label %._crit_edge47.loopexit

._crit_edge50:                                    ; preds = %83, %._crit_edge47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %64 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %65 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS3_SaIS3_EEEESt7greaterIS3_EEvT_SB_T0_(ptr %64, ptr %65)
          to label %91 unwind label %104

.lr.ph49:                                         ; preds = %._crit_edge47, %83
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %67 = load i64, ptr %66, align 8, !tbaa !5
  store i64 %67, ptr %12, align 8, !tbaa !5
  %68 = getelementptr inbounds [200000 x [2 x i64]], ptr @dp, i64 0, i64 %67
  %69 = load i64, ptr %68, align 16, !tbaa !5
  %70 = getelementptr inbounds [200000 x i64], ptr @st, i64 0, i64 %67
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = shl nsw i64 %71, 1
  %73 = add nsw i64 %72, %69
  %74 = getelementptr inbounds i8, ptr %68, i64 8
  %75 = load i64, ptr %74, align 8, !tbaa !5
  %76 = load i64, ptr %29, align 16, !tbaa !5
  %77 = add nsw i64 %76, %73
  store i64 %77, ptr %29, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  store i64 0, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  %78 = add i64 %75, %71
  %79 = sub i64 %73, %78
  store i64 %79, ptr %15, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @_ZNSt4pairIxxEC2IRKxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull align 8 dereferenceable(8) %12)
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %81 unwind label %86

81:                                               ; preds = %.lr.ph49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  store i64 0, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  store i64 %72, ptr %18, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @_ZNSt4pairIxxEC2IRKxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull align 8 dereferenceable(8) %12)
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %83 unwind label %88

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %85 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %85, label %.lr.ph49, label %._crit_edge50

86:                                               ; preds = %.lr.ph49
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %90

88:                                               ; preds = %81
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  br label %90

90:                                               ; preds = %88, %86
  %.pn = phi { ptr, i32 } [ %89, %88 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %138

91:                                               ; preds = %._crit_edge50
  %92 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %93 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS3_SaIS3_EEEESt7greaterIS3_EEvT_SB_T0_(ptr %92, ptr %93)
          to label %.preheader44 unwind label %104

.preheader44:                                     ; preds = %91
  %94 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %95 = icmp ult i64 %94, 2
  br i1 %95, label %.lr.ph51, label %.preheader

.preheader:                                       ; preds = %101, %.preheader44
  %96 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %97 = icmp ult i64 %96, 2
  br i1 %97, label %.lr.ph52, label %._crit_edge53

.lr.ph51:                                         ; preds = %.preheader44, %101
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #5
  %98 = load i64, ptr @N, align 8, !tbaa !5
  %99 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %100 = add i64 %99, %98
  store i64 %100, ptr %21, align 8, !tbaa !5
  call void @_ZNSt4pairIxxEC2IiyTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %101 unwind label %106

101:                                              ; preds = %.lr.ph51
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #5
  %102 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %103 = icmp ult i64 %102, 2
  br i1 %103, label %.lr.ph51, label %.preheader, !llvm.loop !11

104:                                              ; preds = %91, %._crit_edge50
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %138

106:                                              ; preds = %.lr.ph51
  %107 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #5
  br label %138

.lr.ph52:                                         ; preds = %.preheader, %112
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #5
  store i32 0, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #5
  %108 = load i64, ptr @N, align 8, !tbaa !5
  %109 = add nsw i64 %108, 10
  %110 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %111 = add i64 %109, %110
  store i64 %111, ptr %24, align 8, !tbaa !5
  call void @_ZNSt4pairIxxEC2IiyTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 8 dereferenceable(8) %24)
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %112 unwind label %115

112:                                              ; preds = %.lr.ph52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #5
  %113 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %114 = icmp ult i64 %113, 2
  br i1 %114, label %.lr.ph52, label %._crit_edge53, !llvm.loop !13

115:                                              ; preds = %.lr.ph52
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #5
  br label %138

._crit_edge53:                                    ; preds = %112, %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #5
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0) #5
  %118 = load i64, ptr %117, align 8, !tbaa !14
  store i64 %118, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #5
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #5
  %120 = load i64, ptr %119, align 8, !tbaa !14
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 1) #5
  %122 = load i64, ptr %121, align 8, !tbaa !14
  %123 = add nsw i64 %122, %120
  store i64 %123, ptr %26, align 8, !tbaa !5
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %125 = load i64, ptr %124, align 8, !tbaa !5
  store i64 %125, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #5
  %126 = load i64, ptr %29, align 16, !tbaa !5
  %127 = sub nsw i64 %126, %125
  store i64 %127, ptr %29, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #5
  %128 = load i64, ptr %30, align 8, !tbaa !5
  %129 = getelementptr inbounds [200000 x i64], ptr @st, i64 0, i64 %0
  %130 = load i64, ptr %129, align 8, !tbaa !5
  %131 = add nsw i64 %130, %128
  store i64 %131, ptr %27, align 8, !tbaa !5
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %133 = load i64, ptr %132, align 8, !tbaa !5
  store i64 %133, ptr %29, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #5
  %134 = load i64, ptr %129, align 8, !tbaa !5
  %135 = add nsw i64 %134, %133
  store i64 %135, ptr %28, align 8, !tbaa !5
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %137 = load i64, ptr %136, align 8, !tbaa !5
  store i64 %137, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret void

138:                                              ; preds = %115, %106, %104, %90
  %.pn.pn = phi { ptr, i32 } [ %.pn, %90 ], [ %107, %106 ], [ %116, %115 ], [ %105, %104 ]
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 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 #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IiyTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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 #1 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 #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #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 = { 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 long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSSt4pairIxxE", !6, i64 0, !6, i64 8}


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