; LLVM IR from kazunetakahashi/atcoder :: 2017/1210_ARC086/E.ll (Z4makei)

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

@children = external dso_local global [200010 x %"class.std::vector"], align 16
@DP = external dso_local global %"class.std::vector.0", align 8
@itr = external dso_local global [200010 x %"class.__gnu_cxx::__normal_iterator"], align 16
@first = external dso_local global %"class.std::vector.5", align 8

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local ptr @_Z4makei(i32 noundef %0) #2 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @children, i64 0, i64 %20
  %22 = call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  br i1 %22, label %23, label %39

23:                                               ; preds = %1
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIS_IxSaIxEESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @DP, i64 noundef %25) #5
  call void @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EE10push_frontERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %26, ptr noundef nonnull align 8 dereferenceable(24) @first)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %27 = call ptr @_ZNSt6vectorISt5dequeIS_IxSaIxEESaIS2_EESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @DP) #5
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %30) #5
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [200010 x %"class.__gnu_cxx::__normal_iterator"], ptr @itr, i64 0, i64 %34
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %4, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [200010 x %"class.__gnu_cxx::__normal_iterator"], ptr @itr, i64 0, i64 %37
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %38, i64 8, i1 false), !tbaa.struct !9
  br label %254

39:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @children, i64 0, i64 %41
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef 0) #5
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = call ptr @_Z4makei(i32 noundef %44)
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %208, %39
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @children, i64 0, i64 %50
  %52 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #5
  %53 = trunc i64 %52 to i32
  %54 = icmp slt i32 %48, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %47
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %211

56:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @children, i64 0, i64 %58
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %61) #5
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = call ptr @_Z4makei(i32 noundef %63)
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %64, ptr %65, align 8
  %66 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %67 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %66) #5
  %68 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %69 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %68) #5
  %70 = icmp ult i64 %67, %69
  br i1 %70, label %71, label %72

71:                                               ; preds = %56
  call void @_ZSt4swapIN9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS5_EES3_IS7_SaIS7_EEEEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleISF_ESt18is_move_assignableISF_EEE5valueEvE4typeERSF_SO_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br label %72

72:                                               ; preds = %71, %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %73 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %74 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %73) #5
  %75 = trunc i64 %74 to i32
  store i32 %75, ptr %11, align 4, !tbaa !5
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %77 = load i32, ptr %76, align 4, !tbaa !5
  store i32 %77, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %203, %72
  %79 = load i32, ptr %12, align 4, !tbaa !5
  %80 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %81 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %80) #5
  %82 = trunc i64 %81 to i32
  %83 = icmp slt i32 %79, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %78
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %206

85:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %86 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %87 = load i32, ptr %12, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %86, i64 noundef %88) #5
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef 0) #5
  %91 = load i64, ptr %90, align 8, !tbaa !12
  %92 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %93 = load i32, ptr %12, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %92, i64 noundef %94) #5
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef 0) #5
  %97 = load i64, ptr %96, align 8, !tbaa !12
  %98 = mul nsw i64 %91, %97
  %99 = srem i64 %98, 1000000007
  store i64 %99, ptr %13, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %100 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %101 = load i32, ptr %12, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %100, i64 noundef %102) #5
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef 1) #5
  %105 = load i64, ptr %104, align 8, !tbaa !12
  %106 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %107 = load i32, ptr %12, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %106, i64 noundef %108) #5
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef 0) #5
  %111 = load i64, ptr %110, align 8, !tbaa !12
  %112 = mul nsw i64 %105, %111
  %113 = srem i64 %112, 1000000007
  store i64 %113, ptr %14, align 8, !tbaa !12
  %114 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %114, i64 noundef %116) #5
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef 0) #5
  %119 = load i64, ptr %118, align 8, !tbaa !12
  %120 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %121 = load i32, ptr %12, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %120, i64 noundef %122) #5
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef 1) #5
  %125 = load i64, ptr %124, align 8, !tbaa !12
  %126 = mul nsw i64 %119, %125
  %127 = srem i64 %126, 1000000007
  %128 = load i64, ptr %14, align 8, !tbaa !12
  %129 = add nsw i64 %128, %127
  store i64 %129, ptr %14, align 8, !tbaa !12
  %130 = load i64, ptr %14, align 8, !tbaa !12
  %131 = srem i64 %130, 1000000007
  store i64 %131, ptr %14, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %132 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %132, i64 noundef %134) #5
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %135, i64 noundef 0) #5
  %137 = load i64, ptr %136, align 8, !tbaa !12
  %138 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %138, i64 noundef %140) #5
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef 1) #5
  %143 = load i64, ptr %142, align 8, !tbaa !12
  %144 = add nsw i64 %137, %143
  %145 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %146 = load i32, ptr %12, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %145, i64 noundef %147) #5
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %148, i64 noundef 2) #5
  %150 = load i64, ptr %149, align 8, !tbaa !12
  %151 = add nsw i64 %144, %150
  %152 = srem i64 %151, 1000000007
  store i64 %152, ptr %15, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %153 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %154 = load i32, ptr %12, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %153, i64 noundef %155) #5
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %156, i64 noundef 0) #5
  %158 = load i64, ptr %157, align 8, !tbaa !12
  %159 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %160 = load i32, ptr %12, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %159, i64 noundef %161) #5
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef 1) #5
  %164 = load i64, ptr %163, align 8, !tbaa !12
  %165 = add nsw i64 %158, %164
  %166 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %166, i64 noundef %168) #5
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %169, i64 noundef 2) #5
  %171 = load i64, ptr %170, align 8, !tbaa !12
  %172 = add nsw i64 %165, %171
  %173 = srem i64 %172, 1000000007
  store i64 %173, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %174 = load i64, ptr %15, align 8, !tbaa !12
  %175 = load i64, ptr %16, align 8, !tbaa !12
  %176 = mul nsw i64 %174, %175
  %177 = srem i64 %176, 1000000007
  %178 = add nsw i64 %177, 1000000007
  %179 = load i64, ptr %13, align 8, !tbaa !12
  %180 = sub nsw i64 %178, %179
  %181 = add nsw i64 %180, 1000000007
  %182 = load i64, ptr %14, align 8, !tbaa !12
  %183 = sub nsw i64 %181, %182
  %184 = srem i64 %183, 1000000007
  store i64 %184, ptr %17, align 8, !tbaa !12
  %185 = load i64, ptr %13, align 8, !tbaa !12
  %186 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %187 = load i32, ptr %12, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %186, i64 noundef %188) #5
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %189, i64 noundef 0) #5
  store i64 %185, ptr %190, align 8, !tbaa !12
  %191 = load i64, ptr %14, align 8, !tbaa !12
  %192 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %193 = load i32, ptr %12, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %192, i64 noundef %194) #5
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef 1) #5
  store i64 %191, ptr %196, align 8, !tbaa !12
  %197 = load i64, ptr %17, align 8, !tbaa !12
  %198 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %199 = load i32, ptr %12, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %198, i64 noundef %200) #5
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef 2) #5
  store i64 %197, ptr %202, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %203

203:                                              ; preds = %85
  %204 = load i32, ptr %12, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %12, align 4, !tbaa !5
  br label %78, !llvm.loop !14

206:                                              ; preds = %84
  %207 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  call void @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(80) %207) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %208

208:                                              ; preds = %206
  %209 = load i32, ptr %8, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %8, align 4, !tbaa !5
  br label %47, !llvm.loop !16

211:                                              ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %243, %211
  %213 = load i32, ptr %18, align 4, !tbaa !5
  %214 = load i32, ptr %7, align 4, !tbaa !5
  %215 = icmp slt i32 %213, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %212
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %246

217:                                              ; preds = %212
  %218 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %219 = load i32, ptr %18, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %218, i64 noundef %220) #5
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef 2) #5
  %223 = load i64, ptr %222, align 8, !tbaa !12
  %224 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %225 = load i32, ptr %18, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %224, i64 noundef %226) #5
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %227, i64 noundef 0) #5
  %229 = load i64, ptr %228, align 8, !tbaa !12
  %230 = add nsw i64 %229, %223
  store i64 %230, ptr %228, align 8, !tbaa !12
  %231 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %232 = load i32, ptr %18, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %231, i64 noundef %233) #5
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %234, i64 noundef 0) #5
  %236 = load i64, ptr %235, align 8, !tbaa !12
  %237 = srem i64 %236, 1000000007
  store i64 %237, ptr %235, align 8, !tbaa !12
  %238 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %239 = load i32, ptr %18, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %238, i64 noundef %240) #5
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %241, i64 noundef 2) #5
  store i64 0, ptr %242, align 8, !tbaa !12
  br label %243

243:                                              ; preds = %217
  %244 = load i32, ptr %18, align 4, !tbaa !5
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %18, align 4, !tbaa !5
  br label %212, !llvm.loop !17

246:                                              ; preds = %216
  %247 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EE10push_frontERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %247, ptr noundef nonnull align 8 dereferenceable(24) @first)
  %248 = load i32, ptr %3, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [200010 x %"class.__gnu_cxx::__normal_iterator"], ptr @itr, i64 0, i64 %249
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %250, ptr align 8 %6, i64 8, i1 false), !tbaa.struct !9
  %251 = load i32, ptr %3, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [200010 x %"class.__gnu_cxx::__normal_iterator"], ptr @itr, i64 0, i64 %252
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %253, i64 8, i1 false), !tbaa.struct !9
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %254

254:                                              ; preds = %246, %23
  %255 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %2, i32 0, i32 0
  %256 = load ptr, ptr %255, align 8
  ret ptr %256
}

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) #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 nounwind uwtable
declare dso_local void @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 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 #5 = { nounwind }

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

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


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

@children = external dso_local global [200010 x %"class.std::vector"], align 16
@DP = external dso_local global %"class.std::vector.0", align 8
@itr = external dso_local local_unnamed_addr global [200010 x %"class.__gnu_cxx::__normal_iterator"], align 16
@first = external dso_local global %"class.std::vector.5", align 8

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local ptr @_Z4makei(i32 noundef %0) local_unnamed_addr #1 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i32, align 4
  %7 = sext i32 %0 to i64
  %8 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @children, i64 0, i64 %7
  %9 = tail call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br i1 %9, label %10, label %15

10:                                               ; preds = %1
  %11 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIS_IxSaIxEESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @DP, i64 noundef %7) #4
  tail call void @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EE10push_frontERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(24) @first)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %12 = tail call ptr @_ZNSt6vectorISt5dequeIS_IxSaIxEESaIS2_EESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @DP) #4
  store ptr %12, ptr %2, align 8
  %13 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %7) #4
  %14 = getelementptr inbounds [200010 x %"class.__gnu_cxx::__normal_iterator"], ptr @itr, i64 0, i64 %7
  store ptr %13, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  br label %149

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %16 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %17 = load i32, ptr %16, align 4, !tbaa !9
  %18 = tail call ptr @_Z4makei(i32 noundef %17)
  store ptr %18, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  %19 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %20 = trunc i64 %19 to i32
  %21 = icmp sgt i32 %20, 1
  br i1 %21, label %.lr.ph53, label %._crit_edge56

.preheader:                                       ; preds = %._crit_edge
  %.pre = load i32, ptr %4, align 4, !tbaa !9
  %22 = icmp sgt i32 %.pre, 0
  br i1 %22, label %.lr.ph55, label %._crit_edge56

.lr.ph53:                                         ; preds = %15, %._crit_edge
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %._crit_edge ], [ 1, %15 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv58) #4
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = call ptr @_Z4makei(i32 noundef %24)
  store ptr %25, ptr %5, align 8
  %26 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %27 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %26) #4
  %28 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %29 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %28) #4
  %30 = icmp ult i64 %27, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %.lr.ph53
  call void @_ZSt4swapIN9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS5_EES3_IS7_SaIS7_EEEEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleISF_ESt18is_move_assignableISF_EEE5valueEvE4typeERSF_SO_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br label %32

32:                                               ; preds = %31, %.lr.ph53
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %33 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %34 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %33) #4
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %6, align 4, !tbaa !9
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %37 = load i32, ptr %36, align 4, !tbaa !9
  store i32 %37, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  %38 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %39 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %38) #4
  %40 = trunc i64 %39 to i32
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %32
  %42 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(80) %42) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %43 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %sext64 = shl i64 %43, 32
  %44 = ashr exact i64 %sext64, 32
  %45 = icmp slt i64 %indvars.iv.next59, %44
  br i1 %45, label %.lr.ph53, label %.preheader, !llvm.loop !11

.lr.ph:                                           ; preds = %32, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %32 ]
  %46 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %46, i64 noundef %indvars.iv) #4
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef 0) #4
  %49 = load i64, ptr %48, align 8, !tbaa !13
  %50 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %50, i64 noundef %indvars.iv) #4
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 0) #4
  %53 = load i64, ptr %52, align 8, !tbaa !13
  %54 = mul nsw i64 %53, %49
  %55 = srem i64 %54, 1000000007
  %56 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %56, i64 noundef %indvars.iv) #4
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef 1) #4
  %59 = load i64, ptr %58, align 8, !tbaa !13
  %60 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %60, i64 noundef %indvars.iv) #4
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef 0) #4
  %63 = load i64, ptr %62, align 8, !tbaa !13
  %64 = mul nsw i64 %63, %59
  %65 = srem i64 %64, 1000000007
  %66 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %67 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %66, i64 noundef %indvars.iv) #4
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef 0) #4
  %69 = load i64, ptr %68, align 8, !tbaa !13
  %70 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %70, i64 noundef %indvars.iv) #4
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef 1) #4
  %73 = load i64, ptr %72, align 8, !tbaa !13
  %74 = mul nsw i64 %73, %69
  %75 = srem i64 %74, 1000000007
  %76 = add nsw i64 %75, %65
  %.lhs.trunc = trunc nsw i64 %76 to i32
  %77 = srem i32 %.lhs.trunc, 1000000007
  %.sext = sext i32 %77 to i64
  %78 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %79 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %78, i64 noundef %indvars.iv) #4
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef 0) #4
  %81 = load i64, ptr %80, align 8, !tbaa !13
  %82 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %83 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %82, i64 noundef %indvars.iv) #4
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef 1) #4
  %85 = load i64, ptr %84, align 8, !tbaa !13
  %86 = add nsw i64 %85, %81
  %87 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %87, i64 noundef %indvars.iv) #4
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef 2) #4
  %90 = load i64, ptr %89, align 8, !tbaa !13
  %91 = add nsw i64 %86, %90
  %92 = srem i64 %91, 1000000007
  %93 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %93, i64 noundef %indvars.iv) #4
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef 0) #4
  %96 = load i64, ptr %95, align 8, !tbaa !13
  %97 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %97, i64 noundef %indvars.iv) #4
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef 1) #4
  %100 = load i64, ptr %99, align 8, !tbaa !13
  %101 = add nsw i64 %100, %96
  %102 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %102, i64 noundef %indvars.iv) #4
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef 2) #4
  %105 = load i64, ptr %104, align 8, !tbaa !13
  %106 = add nsw i64 %101, %105
  %107 = srem i64 %106, 1000000007
  %108 = mul nsw i64 %107, %92
  %109 = srem i64 %108, 1000000007
  %110 = add nsw i64 %55, %.sext
  %reass.sub = sub nsw i64 %109, %110
  %111 = add nsw i64 %reass.sub, 2000000014
  %112 = srem i64 %111, 1000000007
  %113 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %114 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %113, i64 noundef %indvars.iv) #4
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef 0) #4
  store i64 %55, ptr %115, align 8, !tbaa !13
  %116 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %117 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %116, i64 noundef %indvars.iv) #4
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef 1) #4
  store i64 %.sext, ptr %118, align 8, !tbaa !13
  %119 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %120 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %119, i64 noundef %indvars.iv) #4
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef 2) #4
  store i64 %112, ptr %121, align 8, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %122 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %123 = call noundef i64 @_ZNKSt5dequeISt6vectorIxSaIxEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %122) #4
  %sext = shl i64 %123, 32
  %124 = ashr exact i64 %sext, 32
  %125 = icmp slt i64 %indvars.iv.next, %124
  br i1 %125, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge56:                                    ; preds = %.lr.ph55, %15, %.preheader
  %126 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EE10push_frontERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %126, ptr noundef nonnull align 8 dereferenceable(24) @first)
  %127 = getelementptr inbounds [200010 x %"class.__gnu_cxx::__normal_iterator"], ptr @itr, i64 0, i64 %7
  %128 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %128, ptr %127, align 8, !tbaa !5
  %.sroa.045.0.copyload46.cast = inttoptr i64 %128 to ptr
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %149

.lr.ph55:                                         ; preds = %.preheader, %.lr.ph55
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %.lr.ph55 ], [ 0, %.preheader ]
  %129 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %130 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %129, i64 noundef %indvars.iv61) #4
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef 2) #4
  %132 = load i64, ptr %131, align 8, !tbaa !13
  %133 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %134 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %133, i64 noundef %indvars.iv61) #4
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef 0) #4
  %136 = load i64, ptr %135, align 8, !tbaa !13
  %137 = add nsw i64 %136, %132
  store i64 %137, ptr %135, align 8, !tbaa !13
  %138 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %138, i64 noundef %indvars.iv61) #4
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef 0) #4
  %141 = load i64, ptr %140, align 8, !tbaa !13
  %142 = srem i64 %141, 1000000007
  store i64 %142, ptr %140, align 8, !tbaa !13
  %143 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5dequeISt6vectorIxSaIxEESaIS4_EES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %144 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt6vectorIxSaIxEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %143, i64 noundef %indvars.iv61) #4
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef 2) #4
  store i64 0, ptr %145, align 8, !tbaa !13
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %146 = load i32, ptr %4, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = icmp slt i64 %indvars.iv.next62, %147
  br i1 %148, label %.lr.ph55, label %._crit_edge56, !llvm.loop !16

149:                                              ; preds = %._crit_edge56, %10
  %.sroa.045.0 = phi ptr [ %13, %10 ], [ %.sroa.045.0.copyload46.cast, %._crit_edge56 ]
  ret ptr %.sroa.045.0
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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