; LLVM IR from wesley-a-leung/Resources :: Tests/C++/datastructures/trees/fenwicktrees/FenwickTree1DFuzzTest.ll (Z5test2v)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.std::mersenne_twister_engine" = type { [312 x i64], i64 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.FenwickTree1D = type <{ i32, [4 x i8], %"class.std::vector", [8 x i8] }>
%"struct.std::plus" = type { i8 }
%"struct.std::minus" = type { i8 }
%"struct.std::less" = type { i8 }
%class.anon = type { ptr, ptr }
%"struct.std::less_equal" = type { i8 }
%class.anon.6 = type { ptr, ptr }
%"struct.std::_Setprecision" = type { i32 }

@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [128 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__._Z5test2v = external hidden unnamed_addr constant [13 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [60 x i8], align 1

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

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212system_clock3nowEv() #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEC2Em(ptr noundef nonnull align 8 dereferenceable(2504), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504)) #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: 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)) #4

; 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)) #3 align 2

; 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)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13FenwickTree1DIxSt4plusIxEEC2EixS1_(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef, i64 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13FenwickTree1DIxSt4plusIxEEC2ESt6vectorIxSaIxEExS1_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, i64 noundef) unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13FenwickTree1DIxSt4plusIxEE6valuesISt5minusIxEEESt6vectorIxSaIxEET_(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(33)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #5

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5test2v() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::chrono::time_point", align 8
  %2 = alloca %"class.std::mersenne_twister_engine", align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %struct.FenwickTree1D, align 8
  %18 = alloca %"struct.std::plus", align 1
  %19 = alloca %struct.FenwickTree1D, align 8
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca %"struct.std::plus", align 1
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::vector", align 8
  %25 = alloca %"class.std::vector", align 8
  %26 = alloca %"class.std::vector", align 8
  %27 = alloca %"class.std::vector", align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i64, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i64, align 8
  %35 = alloca i32, align 4
  %36 = alloca i64, align 8
  %37 = alloca %"struct.std::minus", align 1
  %38 = alloca i64, align 8
  %39 = alloca %"struct.std::minus", align 1
  %40 = alloca i64, align 8
  %41 = alloca i64, align 8
  %42 = alloca i32, align 4
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i64, align 8
  %46 = alloca %"struct.std::less", align 1
  %47 = alloca i64, align 8
  %48 = alloca %"struct.std::less", align 1
  %49 = alloca i64, align 8
  %50 = alloca %class.anon, align 8
  %51 = alloca i64, align 8
  %52 = alloca i64, align 8
  %53 = alloca i32, align 4
  %54 = alloca i64, align 8
  %55 = alloca i64, align 8
  %56 = alloca i64, align 8
  %57 = alloca %"struct.std::less_equal", align 1
  %58 = alloca i64, align 8
  %59 = alloca %"struct.std::less_equal", align 1
  %60 = alloca i64, align 8
  %61 = alloca %class.anon.6, align 8
  %62 = alloca %"class.std::vector", align 8
  %63 = alloca %"struct.std::minus", align 1
  %64 = alloca %"class.std::vector", align 8
  %65 = alloca %"struct.std::minus", align 1
  %66 = alloca ptr, align 8
  %67 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %68 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %69 = alloca ptr, align 8
  %70 = alloca %"class.std::chrono::time_point", align 8
  %71 = alloca double, align 8
  %72 = alloca %"class.std::chrono::duration", align 8
  %73 = alloca %"struct.std::_Setprecision", align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #7
  %74 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #7
  %75 = getelementptr inbounds %"class.std::chrono::time_point", ptr %1, i32 0, i32 0
  %76 = getelementptr inbounds %"class.std::chrono::duration", ptr %75, i32 0, i32 0
  store i64 %74, ptr %76, align 8
  call void @llvm.lifetime.start.p0(i64 2504, ptr %2) #7
  call void @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEC2Em(ptr noundef nonnull align 8 dereferenceable(2504) %2, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 100000, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %542, %0
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = icmp slt i32 %78, 100000
  br i1 %79, label %81, label %80

80:                                               ; preds = %77
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %554

81:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %82 = call noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
  %83 = urem i64 %82, 10
  %84 = call noundef double @_ZSt3powIimEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef 10, i64 noundef %83)
  %85 = fptosi double %84 to i32
  store i32 %85, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %86 = call noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
  %87 = urem i64 %86, 101
  %88 = trunc i64 %87 to i32
  store i32 %88, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %90, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %91 unwind label %101

91:                                               ; preds = %81
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store ptr %9, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %92 = load ptr, ptr %13, align 8, !tbaa !11
  %93 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %92) #7
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %93, ptr %94, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %95 = load ptr, ptr %13, align 8, !tbaa !11
  %96 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %95) #7
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %96, ptr %97, align 8
  br label %98

98:                                               ; preds = %114, %91
  %99 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %99, label %105, label %100

100:                                              ; preds = %98
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %120

101:                                              ; preds = %81
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %11, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  br label %553

105:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  store ptr %106, ptr %16, align 8, !tbaa !11
  %107 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %108 unwind label %116

108:                                              ; preds = %105
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = urem i64 %107, %110
  %112 = add i64 %111, 1
  %113 = load ptr, ptr %16, align 8, !tbaa !11
  store i64 %112, ptr %113, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %114

114:                                              ; preds = %108
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %98

116:                                              ; preds = %105
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %552

120:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #7
  %121 = load i32, ptr %8, align 4, !tbaa !5
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEEC2EixS1_(ptr noundef nonnull align 8 dereferenceable(33) %17, i32 noundef %121, i64 noundef 0)
          to label %122 unwind label %130

122:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #7
  invoke void @_ZNSt6vectorIxSaIxEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %123 unwind label %134

123:                                              ; preds = %122
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEEC2ESt6vectorIxSaIxEExS1_(ptr noundef nonnull align 8 dereferenceable(33) %19, ptr noundef %20, i64 noundef 0)
          to label %124 unwind label %138

124:                                              ; preds = %123
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %149, %124
  %126 = load i32, ptr %22, align 4, !tbaa !5
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %142, label %129

129:                                              ; preds = %125
  store i32 7, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %156

130:                                              ; preds = %120
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %11, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %12, align 4
  br label %551

134:                                              ; preds = %122
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %11, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %12, align 4
  br label %550

138:                                              ; preds = %123
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %11, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %12, align 4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  br label %550

142:                                              ; preds = %125
  %143 = load i32, ptr %22, align 4, !tbaa !5
  %144 = load i32, ptr %22, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %145) #7
  %147 = load i64, ptr %146, align 8, !tbaa !9
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEE6updateEix(ptr noundef nonnull align 8 dereferenceable(33) %17, i32 noundef %143, i64 noundef %147)
          to label %148 unwind label %152

148:                                              ; preds = %142
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %22, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %22, align 4, !tbaa !5
  br label %125, !llvm.loop !13

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

156:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %157 = load i32, ptr %8, align 4, !tbaa !5
  %158 = icmp eq i32 %157, 0
  br i1 %158, label %159, label %160

159:                                              ; preds = %156
  br label %165

160:                                              ; preds = %156
  %161 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %162 unwind label %173

162:                                              ; preds = %160
  %163 = urem i64 %161, 5
  %164 = sub i64 100, %163
  br label %165

165:                                              ; preds = %162, %159
  %166 = phi i64 [ 0, %159 ], [ %164, %162 ]
  %167 = trunc i64 %166 to i32
  store i32 %167, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %474, %165
  %169 = load i32, ptr %28, align 4, !tbaa !5
  %170 = load i32, ptr %23, align 4, !tbaa !5
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %177, label %172

172:                                              ; preds = %168
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %478

173:                                              ; preds = %160
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %11, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %12, align 4
  br label %548

177:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %178 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %179 unwind label %209

179:                                              ; preds = %177
  %180 = urem i64 %178, 4
  %181 = trunc i64 %180 to i32
  store i32 %181, ptr %29, align 4, !tbaa !5
  %182 = load i32, ptr %29, align 4, !tbaa !5
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %222

184:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %185 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %186 unwind label %213

186:                                              ; preds = %184
  %187 = load i32, ptr %8, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = urem i64 %185, %188
  %190 = trunc i64 %189 to i32
  store i32 %190, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %191 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %192 unwind label %217

192:                                              ; preds = %186
  %193 = load i32, ptr %7, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = urem i64 %191, %194
  %196 = add i64 %195, 1
  store i64 %196, ptr %31, align 8, !tbaa !9
  %197 = load i64, ptr %31, align 8, !tbaa !9
  %198 = load i32, ptr %30, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %199) #7
  %201 = load i64, ptr %200, align 8, !tbaa !9
  %202 = add nsw i64 %201, %197
  store i64 %202, ptr %200, align 8, !tbaa !9
  %203 = load i32, ptr %30, align 4, !tbaa !5
  %204 = load i64, ptr %31, align 8, !tbaa !9
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEE6updateEix(ptr noundef nonnull align 8 dereferenceable(33) %17, i32 noundef %203, i64 noundef %204)
          to label %205 unwind label %217

205:                                              ; preds = %192
  %206 = load i32, ptr %30, align 4, !tbaa !5
  %207 = load i64, ptr %31, align 8, !tbaa !9
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEE6updateEix(ptr noundef nonnull align 8 dereferenceable(33) %19, i32 noundef %206, i64 noundef %207)
          to label %208 unwind label %217

208:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %473

209:                                              ; preds = %177
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %11, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %12, align 4
  br label %477

213:                                              ; preds = %184
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %11, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %12, align 4
  br label %221

217:                                              ; preds = %205, %192, %186
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %11, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %221

221:                                              ; preds = %217, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %477

222:                                              ; preds = %179
  %223 = load i32, ptr %29, align 4, !tbaa !5
  %224 = icmp eq i32 %223, 1
  br i1 %224, label %225, label %296

225:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %226 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %227 unwind label %242

227:                                              ; preds = %225
  %228 = load i32, ptr %8, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = urem i64 %226, %229
  %231 = trunc i64 %230 to i32
  store i32 %231, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %232 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %233 unwind label %246

233:                                              ; preds = %227
  %234 = load i32, ptr %8, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = urem i64 %232, %235
  %237 = trunc i64 %236 to i32
  store i32 %237, ptr %33, align 4, !tbaa !5
  %238 = load i32, ptr %32, align 4, !tbaa !5
  %239 = load i32, ptr %33, align 4, !tbaa !5
  %240 = icmp sgt i32 %238, %239
  br i1 %240, label %241, label %250

241:                                              ; preds = %233
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %33) #7
  br label %250

242:                                              ; preds = %225
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %11, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %12, align 4
  br label %295

246:                                              ; preds = %227
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %11, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %12, align 4
  br label %294

250:                                              ; preds = %241, %233
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  store i64 0, ptr %34, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %251 = load i32, ptr %32, align 4, !tbaa !5
  store i32 %251, ptr %35, align 4, !tbaa !5
  br label %252

252:                                              ; preds = %264, %250
  %253 = load i32, ptr %35, align 4, !tbaa !5
  %254 = load i32, ptr %33, align 4, !tbaa !5
  %255 = icmp sle i32 %253, %254
  br i1 %255, label %257, label %256

256:                                              ; preds = %252
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %267

257:                                              ; preds = %252
  %258 = load i32, ptr %35, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %259) #7
  %261 = load i64, ptr %260, align 8, !tbaa !9
  %262 = load i64, ptr %34, align 8, !tbaa !9
  %263 = add nsw i64 %262, %261
  store i64 %263, ptr %34, align 8, !tbaa !9
  br label %264

264:                                              ; preds = %257
  %265 = load i32, ptr %35, align 4, !tbaa !5
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %35, align 4, !tbaa !5
  br label %252, !llvm.loop !15

267:                                              ; preds = %256
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %268 unwind label %281

268:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %269 = load i32, ptr %32, align 4, !tbaa !5
  %270 = load i32, ptr %33, align 4, !tbaa !5
  %271 = invoke noundef i64 @_ZN13FenwickTree1DIxSt4plusIxEE5queryISt5minusIxEEExiiT_(ptr noundef nonnull align 8 dereferenceable(33) %17, i32 noundef %269, i32 noundef %270)
          to label %272 unwind label %285

272:                                              ; preds = %268
  store i64 %271, ptr %36, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %273 unwind label %285

273:                                              ; preds = %272
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %274 = load i32, ptr %32, align 4, !tbaa !5
  %275 = load i32, ptr %33, align 4, !tbaa !5
  %276 = invoke noundef i64 @_ZN13FenwickTree1DIxSt4plusIxEE5queryISt5minusIxEEExiiT_(ptr noundef nonnull align 8 dereferenceable(33) %19, i32 noundef %274, i32 noundef %275)
          to label %277 unwind label %289

277:                                              ; preds = %273
  store i64 %276, ptr %38, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %278 unwind label %289

278:                                              ; preds = %277
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  %279 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(8) %279)
          to label %280 unwind label %281

280:                                              ; preds = %278
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %472

281:                                              ; preds = %278, %267
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %11, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %12, align 4
  br label %293

285:                                              ; preds = %272, %268
  %286 = landingpad { ptr, i32 }
          cleanup
  %287 = extractvalue { ptr, i32 } %286, 0
  store ptr %287, ptr %11, align 8
  %288 = extractvalue { ptr, i32 } %286, 1
  store i32 %288, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  br label %293

289:                                              ; preds = %277, %273
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %11, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  br label %293

293:                                              ; preds = %289, %285, %281
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %294

294:                                              ; preds = %293, %246
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %295

295:                                              ; preds = %294, %242
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %477

296:                                              ; preds = %222
  %297 = load i32, ptr %29, align 4, !tbaa !5
  %298 = icmp eq i32 %297, 2
  br i1 %298, label %299, label %385

299:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %300 = load i32, ptr %8, align 4, !tbaa !5
  %301 = sub nsw i32 %300, 1
  %302 = invoke noundef i64 @_ZN13FenwickTree1DIxSt4plusIxEE5queryEi(ptr noundef nonnull align 8 dereferenceable(33) %17, i32 noundef %301)
          to label %303 unwind label %333

303:                                              ; preds = %299
  %304 = mul nsw i64 %302, 2
  %305 = add nsw i64 %304, 1
  store i64 %305, ptr %40, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %306 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %307 unwind label %337

307:                                              ; preds = %303
  %308 = load i64, ptr %40, align 8, !tbaa !9
  %309 = urem i64 %306, %308
  store i64 %309, ptr %41, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  store i32 0, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  store i64 0, ptr %43, align 8, !tbaa !9
  br label %310

310:                                              ; preds = %325, %307
  %311 = load i32, ptr %42, align 4, !tbaa !5
  %312 = load i32, ptr %8, align 4, !tbaa !5
  %313 = icmp slt i32 %311, %312
  br i1 %313, label %314, label %323

314:                                              ; preds = %310
  %315 = load i64, ptr %43, align 8, !tbaa !9
  %316 = load i32, ptr %42, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %317) #7
  %319 = load i64, ptr %318, align 8, !tbaa !9
  %320 = add nsw i64 %315, %319
  %321 = load i64, ptr %41, align 8, !tbaa !9
  %322 = icmp slt i64 %320, %321
  br label %323

323:                                              ; preds = %314, %310
  %324 = phi i1 [ false, %310 ], [ %322, %314 ]
  br i1 %324, label %325, label %341

325:                                              ; preds = %323
  %326 = load i32, ptr %42, align 4, !tbaa !5
  %327 = add nsw i32 %326, 1
  store i32 %327, ptr %42, align 4, !tbaa !5
  %328 = sext i32 %326 to i64
  %329 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %328) #7
  %330 = load i64, ptr %329, align 8, !tbaa !9
  %331 = load i64, ptr %43, align 8, !tbaa !9
  %332 = add nsw i64 %331, %330
  store i64 %332, ptr %43, align 8, !tbaa !9
  br label %310, !llvm.loop !16

333:                                              ; preds = %299
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %11, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %12, align 4
  br label %384

337:                                              ; preds = %303
  %338 = landingpad { ptr, i32 }
          cleanup
  %339 = extractvalue { ptr, i32 } %338, 0
  store ptr %339, ptr %11, align 8
  %340 = extractvalue { ptr, i32 } %338, 1
  store i32 %340, ptr %12, align 4
  br label %383

341:                                              ; preds = %323
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %342 = load i32, ptr %42, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  store i64 %343, ptr %44, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(8) %44)
          to label %344 unwind label %366

344:                                              ; preds = %341
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %345 = load i64, ptr %41, align 8, !tbaa !9
  %346 = invoke noundef i32 @_ZN13FenwickTree1DIxSt4plusIxEE7bsearchISt4lessIxEEEixT_(ptr noundef nonnull align 8 dereferenceable(33) %17, i64 noundef %345)
          to label %347 unwind label %370

347:                                              ; preds = %344
  %348 = sext i32 %346 to i64
  store i64 %348, ptr %45, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(8) %45)
          to label %349 unwind label %370

349:                                              ; preds = %347
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %350 = load i64, ptr %41, align 8, !tbaa !9
  %351 = invoke noundef i32 @_ZN13FenwickTree1DIxSt4plusIxEE7bsearchISt4lessIxEEEixT_(ptr noundef nonnull align 8 dereferenceable(33) %19, i64 noundef %350)
          to label %352 unwind label %374

352:                                              ; preds = %349
  %353 = sext i32 %351 to i64
  store i64 %353, ptr %47, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %354 unwind label %374

354:                                              ; preds = %352
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #7
  %355 = load i32, ptr %8, align 4, !tbaa !5
  %356 = getelementptr inbounds %class.anon, ptr %50, i32 0, i32 0
  store ptr %19, ptr %356, align 8, !tbaa !11
  %357 = getelementptr inbounds %class.anon, ptr %50, i32 0, i32 1
  store ptr %41, ptr %357, align 8, !tbaa !11
  %358 = getelementptr inbounds { ptr, ptr }, ptr %50, i32 0, i32 0
  %359 = load ptr, ptr %358, align 8
  %360 = getelementptr inbounds { ptr, ptr }, ptr %50, i32 0, i32 1
  %361 = load ptr, ptr %360, align 8
  %362 = invoke noundef i32 @"_Z7bsearchILb1EiZ5test2vE3$_0ET0_S1_S1_T1_"(i32 noundef 0, i32 noundef %355, ptr %359, ptr %361)
          to label %363 unwind label %378

363:                                              ; preds = %354
  %364 = sext i32 %362 to i64
  store i64 %364, ptr %49, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %365 unwind label %378

365:                                              ; preds = %363
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %471

366:                                              ; preds = %341
  %367 = landingpad { ptr, i32 }
          cleanup
  %368 = extractvalue { ptr, i32 } %367, 0
  store ptr %368, ptr %11, align 8
  %369 = extractvalue { ptr, i32 } %367, 1
  store i32 %369, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  br label %382

370:                                              ; preds = %347, %344
  %371 = landingpad { ptr, i32 }
          cleanup
  %372 = extractvalue { ptr, i32 } %371, 0
  store ptr %372, ptr %11, align 8
  %373 = extractvalue { ptr, i32 } %371, 1
  store i32 %373, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  br label %382

374:                                              ; preds = %352, %349
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %11, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  br label %382

378:                                              ; preds = %363, %354
  %379 = landingpad { ptr, i32 }
          cleanup
  %380 = extractvalue { ptr, i32 } %379, 0
  store ptr %380, ptr %11, align 8
  %381 = extractvalue { ptr, i32 } %379, 1
  store i32 %381, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  br label %382

382:                                              ; preds = %378, %374, %370, %366
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %383

383:                                              ; preds = %382, %337
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %384

384:                                              ; preds = %383, %333
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %477

385:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #7
  %386 = load i32, ptr %8, align 4, !tbaa !5
  %387 = sub nsw i32 %386, 1
  %388 = invoke noundef i64 @_ZN13FenwickTree1DIxSt4plusIxEE5queryEi(ptr noundef nonnull align 8 dereferenceable(33) %17, i32 noundef %387)
          to label %389 unwind label %419

389:                                              ; preds = %385
  %390 = mul nsw i64 %388, 2
  %391 = add nsw i64 %390, 1
  store i64 %391, ptr %51, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #7
  %392 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %393 unwind label %423

393:                                              ; preds = %389
  %394 = load i64, ptr %51, align 8, !tbaa !9
  %395 = urem i64 %392, %394
  store i64 %395, ptr %52, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #7
  store i32 0, ptr %53, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #7
  store i64 0, ptr %54, align 8, !tbaa !9
  br label %396

396:                                              ; preds = %411, %393
  %397 = load i32, ptr %53, align 4, !tbaa !5
  %398 = load i32, ptr %8, align 4, !tbaa !5
  %399 = icmp slt i32 %397, %398
  br i1 %399, label %400, label %409

400:                                              ; preds = %396
  %401 = load i64, ptr %54, align 8, !tbaa !9
  %402 = load i32, ptr %53, align 4, !tbaa !5
  %403 = sext i32 %402 to i64
  %404 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %403) #7
  %405 = load i64, ptr %404, align 8, !tbaa !9
  %406 = add nsw i64 %401, %405
  %407 = load i64, ptr %52, align 8, !tbaa !9
  %408 = icmp sle i64 %406, %407
  br label %409

409:                                              ; preds = %400, %396
  %410 = phi i1 [ false, %396 ], [ %408, %400 ]
  br i1 %410, label %411, label %427

411:                                              ; preds = %409
  %412 = load i32, ptr %53, align 4, !tbaa !5
  %413 = add nsw i32 %412, 1
  store i32 %413, ptr %53, align 4, !tbaa !5
  %414 = sext i32 %412 to i64
  %415 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %414) #7
  %416 = load i64, ptr %415, align 8, !tbaa !9
  %417 = load i64, ptr %54, align 8, !tbaa !9
  %418 = add nsw i64 %417, %416
  store i64 %418, ptr %54, align 8, !tbaa !9
  br label %396, !llvm.loop !17

419:                                              ; preds = %385
  %420 = landingpad { ptr, i32 }
          cleanup
  %421 = extractvalue { ptr, i32 } %420, 0
  store ptr %421, ptr %11, align 8
  %422 = extractvalue { ptr, i32 } %420, 1
  store i32 %422, ptr %12, align 4
  br label %470

423:                                              ; preds = %389
  %424 = landingpad { ptr, i32 }
          cleanup
  %425 = extractvalue { ptr, i32 } %424, 0
  store ptr %425, ptr %11, align 8
  %426 = extractvalue { ptr, i32 } %424, 1
  store i32 %426, ptr %12, align 4
  br label %469

427:                                              ; preds = %409
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #7
  %428 = load i32, ptr %53, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  store i64 %429, ptr %55, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(8) %55)
          to label %430 unwind label %452

430:                                              ; preds = %427
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #7
  %431 = load i64, ptr %52, align 8, !tbaa !9
  %432 = invoke noundef i32 @_ZN13FenwickTree1DIxSt4plusIxEE7bsearchISt10less_equalIxEEEixT_(ptr noundef nonnull align 8 dereferenceable(33) %17, i64 noundef %431)
          to label %433 unwind label %456

433:                                              ; preds = %430
  %434 = sext i32 %432 to i64
  store i64 %434, ptr %56, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(8) %56)
          to label %435 unwind label %456

435:                                              ; preds = %433
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #7
  %436 = load i64, ptr %52, align 8, !tbaa !9
  %437 = invoke noundef i32 @_ZN13FenwickTree1DIxSt4plusIxEE7bsearchISt10less_equalIxEEEixT_(ptr noundef nonnull align 8 dereferenceable(33) %19, i64 noundef %436)
          to label %438 unwind label %460

438:                                              ; preds = %435
  %439 = sext i32 %437 to i64
  store i64 %439, ptr %58, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %58)
          to label %440 unwind label %460

440:                                              ; preds = %438
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #7
  %441 = load i32, ptr %8, align 4, !tbaa !5
  %442 = getelementptr inbounds %class.anon.6, ptr %61, i32 0, i32 0
  store ptr %19, ptr %442, align 8, !tbaa !11
  %443 = getelementptr inbounds %class.anon.6, ptr %61, i32 0, i32 1
  store ptr %52, ptr %443, align 8, !tbaa !11
  %444 = getelementptr inbounds { ptr, ptr }, ptr %61, i32 0, i32 0
  %445 = load ptr, ptr %444, align 8
  %446 = getelementptr inbounds { ptr, ptr }, ptr %61, i32 0, i32 1
  %447 = load ptr, ptr %446, align 8
  %448 = invoke noundef i32 @"_Z7bsearchILb1EiZ5test2vE3$_1ET0_S1_S1_T1_"(i32 noundef 0, i32 noundef %441, ptr %445, ptr %447)
          to label %449 unwind label %464

449:                                              ; preds = %440
  %450 = sext i32 %448 to i64
  store i64 %450, ptr %60, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %451 unwind label %464

451:                                              ; preds = %449
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #7
  br label %471

452:                                              ; preds = %427
  %453 = landingpad { ptr, i32 }
          cleanup
  %454 = extractvalue { ptr, i32 } %453, 0
  store ptr %454, ptr %11, align 8
  %455 = extractvalue { ptr, i32 } %453, 1
  store i32 %455, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #7
  br label %468

456:                                              ; preds = %433, %430
  %457 = landingpad { ptr, i32 }
          cleanup
  %458 = extractvalue { ptr, i32 } %457, 0
  store ptr %458, ptr %11, align 8
  %459 = extractvalue { ptr, i32 } %457, 1
  store i32 %459, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #7
  br label %468

460:                                              ; preds = %438, %435
  %461 = landingpad { ptr, i32 }
          cleanup
  %462 = extractvalue { ptr, i32 } %461, 0
  store ptr %462, ptr %11, align 8
  %463 = extractvalue { ptr, i32 } %461, 1
  store i32 %463, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #7
  br label %468

464:                                              ; preds = %449, %440
  %465 = landingpad { ptr, i32 }
          cleanup
  %466 = extractvalue { ptr, i32 } %465, 0
  store ptr %466, ptr %11, align 8
  %467 = extractvalue { ptr, i32 } %465, 1
  store i32 %467, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #7
  br label %468

468:                                              ; preds = %464, %460, %456, %452
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #7
  br label %469

469:                                              ; preds = %468, %423
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  br label %470

470:                                              ; preds = %469, %419
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #7
  br label %477

471:                                              ; preds = %451, %365
  br label %472

472:                                              ; preds = %471, %280
  br label %473

473:                                              ; preds = %472, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %474

474:                                              ; preds = %473
  %475 = load i32, ptr %28, align 4, !tbaa !5
  %476 = add nsw i32 %475, 1
  store i32 %476, ptr %28, align 4, !tbaa !5
  br label %168, !llvm.loop !18

477:                                              ; preds = %470, %384, %295, %221, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %547

478:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 24, ptr %62) #7
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEE6valuesISt5minusIxEEESt6vectorIxSaIxEET_(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %62, ptr noundef nonnull align 8 dereferenceable(33) %17)
          to label %479 unwind label %485

479:                                              ; preds = %478
  call void @llvm.lifetime.start.p0(i64 24, ptr %64) #7
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEE6valuesISt5minusIxEEESt6vectorIxSaIxEET_(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %64, ptr noundef nonnull align 8 dereferenceable(33) %19)
          to label %480 unwind label %489

480:                                              ; preds = %479
  %481 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %482 unwind label %493

482:                                              ; preds = %480
  br i1 %481, label %483, label %484

483:                                              ; preds = %482
  br label %498

484:                                              ; preds = %482
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 119, ptr noundef @__PRETTY_FUNCTION__._Z5test2v) #8
  unreachable

485:                                              ; preds = %478
  %486 = landingpad { ptr, i32 }
          cleanup
  %487 = extractvalue { ptr, i32 } %486, 0
  store ptr %487, ptr %11, align 8
  %488 = extractvalue { ptr, i32 } %486, 1
  store i32 %488, ptr %12, align 4
  br label %546

489:                                              ; preds = %479
  %490 = landingpad { ptr, i32 }
          cleanup
  %491 = extractvalue { ptr, i32 } %490, 0
  store ptr %491, ptr %11, align 8
  %492 = extractvalue { ptr, i32 } %490, 1
  store i32 %492, ptr %12, align 4
  br label %545

493:                                              ; preds = %516, %510, %504, %498, %480
  %494 = landingpad { ptr, i32 }
          cleanup
  %495 = extractvalue { ptr, i32 } %494, 0
  store ptr %495, ptr %11, align 8
  %496 = extractvalue { ptr, i32 } %494, 1
  store i32 %496, ptr %12, align 4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %64) #7
  br label %545

497:                                              ; No predecessors!
  br label %498

498:                                              ; preds = %497, %483
  %499 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %500 unwind label %493

500:                                              ; preds = %498
  br i1 %499, label %501, label %502

501:                                              ; preds = %500
  br label %504

502:                                              ; preds = %500
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 120, ptr noundef @__PRETTY_FUNCTION__._Z5test2v) #8
  unreachable

503:                                              ; No predecessors!
  br label %504

504:                                              ; preds = %503, %501
  %505 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %27)
          to label %506 unwind label %493

506:                                              ; preds = %504
  br i1 %505, label %507, label %508

507:                                              ; preds = %506
  br label %510

508:                                              ; preds = %506
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 121, ptr noundef @__PRETTY_FUNCTION__._Z5test2v) #8
  unreachable

509:                                              ; No predecessors!
  br label %510

510:                                              ; preds = %509, %507
  %511 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %62)
          to label %512 unwind label %493

512:                                              ; preds = %510
  br i1 %511, label %513, label %514

513:                                              ; preds = %512
  br label %516

514:                                              ; preds = %512
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 122, ptr noundef @__PRETTY_FUNCTION__._Z5test2v) #8
  unreachable

515:                                              ; No predecessors!
  br label %516

516:                                              ; preds = %515, %513
  %517 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %64)
          to label %518 unwind label %493

518:                                              ; preds = %516
  br i1 %517, label %519, label %520

519:                                              ; preds = %518
  br label %522

520:                                              ; preds = %518
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 123, ptr noundef @__PRETTY_FUNCTION__._Z5test2v) #8
  unreachable

521:                                              ; No predecessors!
  br label %522

522:                                              ; preds = %521, %519
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #7
  store ptr %24, ptr %66, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #7
  %523 = load ptr, ptr %66, align 8, !tbaa !11
  %524 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %523) #7
  %525 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %67, i32 0, i32 0
  store ptr %524, ptr %525, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #7
  %526 = load ptr, ptr %66, align 8, !tbaa !11
  %527 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %526) #7
  %528 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %68, i32 0, i32 0
  store ptr %527, ptr %528, align 8
  br label %529

529:                                              ; preds = %539, %522
  %530 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(8) %68) #7
  br i1 %530, label %532, label %531

531:                                              ; preds = %529
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #7
  br label %541

532:                                              ; preds = %529
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #7
  %533 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #7
  store ptr %533, ptr %69, align 8, !tbaa !11
  %534 = load i64, ptr %4, align 8, !tbaa !9
  %535 = mul nsw i64 31, %534
  %536 = load ptr, ptr %69, align 8, !tbaa !11
  %537 = load i64, ptr %536, align 8, !tbaa !9
  %538 = add nsw i64 %535, %537
  store i64 %538, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #7
  br label %539

539:                                              ; preds = %532
  %540 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #7
  br label %529

541:                                              ; preds = %531
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %64) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %64) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %62) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %62) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %19) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #7
  call void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %17) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %542

542:                                              ; preds = %541
  %543 = load i32, ptr %5, align 4, !tbaa !5
  %544 = add nsw i32 %543, 1
  store i32 %544, ptr %5, align 4, !tbaa !5
  br label %77, !llvm.loop !19

545:                                              ; preds = %493, %489
  call void @llvm.lifetime.end.p0(i64 24, ptr %64) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %62) #7
  br label %546

546:                                              ; preds = %545, %485
  call void @llvm.lifetime.end.p0(i64 24, ptr %62) #7
  br label %547

547:                                              ; preds = %546, %477
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #7
  br label %548

548:                                              ; preds = %547, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %549

549:                                              ; preds = %548, %152
  call void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %19) #7
  br label %550

550:                                              ; preds = %549, %138, %134
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #7
  call void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %17) #7
  br label %551

551:                                              ; preds = %550, %130
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #7
  br label %552

552:                                              ; preds = %551, %116
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %553

553:                                              ; preds = %552, %101
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 2504, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  br label %580

554:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #7
  %555 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #7
  %556 = getelementptr inbounds %"class.std::chrono::time_point", ptr %70, i32 0, i32 0
  %557 = getelementptr inbounds %"class.std::chrono::duration", ptr %556, i32 0, i32 0
  store i64 %555, ptr %557, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #7
  %558 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %559 = getelementptr inbounds %"class.std::chrono::duration", ptr %72, i32 0, i32 0
  store i64 %558, ptr %559, align 8
  %560 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %72)
  %561 = sitofp i64 %560 to double
  %562 = fdiv double %561, 1.000000e+09
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #7
  store double %562, ptr %71, align 8, !tbaa !20
  %563 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %564 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %563, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %565 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
  %566 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %565, ptr noundef @_ZSt5fixedRSt8ios_base)
  %567 = call i32 @_ZSt12setprecisioni(i32 noundef 3)
  %568 = getelementptr inbounds %"struct.std::_Setprecision", ptr %73, i32 0, i32 0
  store i32 %567, ptr %568, align 4
  %569 = getelementptr inbounds %"struct.std::_Setprecision", ptr %73, i32 0, i32 0
  %570 = load i32, ptr %569, align 4
  %571 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %566, i32 %570)
  %572 = load double, ptr %71, align 8, !tbaa !20
  %573 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %571, double noundef %572)
  %574 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %573, ptr noundef @.str.8)
  %575 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %574, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %576 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
  %577 = load i64, ptr %4, align 8, !tbaa !9
  %578 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %576, i64 noundef %577)
  %579 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %578, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 2504, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  ret void

580:                                              ; preds = %553
  %581 = load ptr, ptr %11, align 8
  %582 = load i32, ptr %12, align 4
  %583 = insertvalue { ptr, i32 } poison, ptr %581, 0
  %584 = insertvalue { ptr, i32 } %583, i32 %582, 1
  resume { ptr, i32 } %584
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIimEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i64 noundef) #4

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @"_Z7bsearchILb1EiZ5test2vE3$_0ET0_S1_S1_T1_"(i32 noundef, i32 noundef, ptr, ptr) #2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @"_Z7bsearchILb1EiZ5test2vE3$_1ET0_S1_S1_T1_"(i32 noundef, i32 noundef, ptr, ptr) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

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

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


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.std::mersenne_twister_engine" = type { [312 x i64], i64 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.FenwickTree1D = type <{ i32, [4 x i8], %"class.std::vector", [8 x i8] }>

@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [128 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__._Z5test2v = external hidden unnamed_addr constant [13 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [60 x i8], align 1

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

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212system_clock3nowEv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEC2Em(ptr noundef nonnull align 8 dereferenceable(2504), i64 noundef) unnamed_addr #2 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: 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 #4

; 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 #3 align 2

; 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13FenwickTree1DIxSt4plusIxEEC2EixS1_(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef, i64 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13FenwickTree1DIxSt4plusIxEEC2ESt6vectorIxSaIxEExS1_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, i64 noundef) unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13FenwickTree1DIxSt4plusIxEE6valuesISt5minusIxEEESt6vectorIxSaIxEET_(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5test2v() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::chrono::time_point", align 8
  %2 = alloca %"class.std::mersenne_twister_engine", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %struct.FenwickTree1D, align 8
  %8 = alloca %struct.FenwickTree1D, align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %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 = alloca %"class.std::vector", align 8
  %30 = alloca %"class.std::vector", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"class.std::chrono::time_point", align 8
  %34 = alloca %"class.std::chrono::duration", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %35 = tail call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  store i64 %35, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 2504, ptr nonnull %2) #8
  call void @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEC2Em(ptr noundef nonnull align 8 dereferenceable(2504) %2, i64 noundef 0)
  br label %54

36:                                               ; preds = %._crit_edge179
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #8
  %37 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  store i64 %37, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #8
  %38 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %1)
  store i64 %38, ptr %34, align 8
  %39 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  %40 = sitofp i64 %39 to double
  %41 = fdiv double %40, 1.000000e+09
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #8
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.7)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %46 = call i32 @_ZSt12setprecisioni(i32 noundef 3)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %45, i32 %46)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %47, double noundef %41)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull @.str.8)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.9)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %51, i64 noundef %.1.lcssa)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 2504, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret void

54:                                               ; preds = %0, %._crit_edge179
  %.0182 = phi i64 [ 0, %0 ], [ %.1.lcssa, %._crit_edge179 ]
  %.065181 = phi i32 [ 0, %0 ], [ %293, %._crit_edge179 ]
  %55 = call noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
  %56 = urem i64 %55, 10
  %57 = call noundef double @_ZSt3powIimEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef 10, i64 noundef %56)
  %58 = fptosi double %57 to i32
  %59 = call noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
  %60 = urem i64 %59, 101
  %61 = trunc nuw nsw i64 %60 to i32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %60, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %62 unwind label %67

62:                                               ; preds = %54
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %63 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  store ptr %63, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %64 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  store ptr %64, ptr %6, align 8
  %65 = 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) #8
  br i1 %65, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %62
  %66 = sext i32 %58 to i64
  br label %69

._crit_edge:                                      ; preds = %72, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #8
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEEC2EixS1_(ptr noundef nonnull align 8 dereferenceable(33) %7, i32 noundef %61, i64 noundef 0)
          to label %79 unwind label %82

67:                                               ; preds = %54
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  br label %307

69:                                               ; preds = %.lr.ph, %72
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %71 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %72 unwind label %77

72:                                               ; preds = %69
  %73 = urem i64 %71, %66
  %74 = add nuw i64 %73, 1
  store i64 %74, ptr %70, align 8, !tbaa !5
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %76 = 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) #8
  br i1 %76, label %69, label %._crit_edge

77:                                               ; preds = %69
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %306

79:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #8
  invoke void @_ZNSt6vectorIxSaIxEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %80 unwind label %84

80:                                               ; preds = %79
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEEC2ESt6vectorIxSaIxEExS1_(ptr noundef nonnull align 8 dereferenceable(33) %8, ptr noundef nonnull %9, i64 noundef 0)
          to label %81 unwind label %86

81:                                               ; preds = %80
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %.not183 = icmp eq i64 %60, 0
  br i1 %.not183, label %._crit_edge153.thread, label %.lr.ph152.preheader

.lr.ph152.preheader:                              ; preds = %81
  %umax = call i32 @llvm.umax.i32(i32 %61, i32 1)
  %wide.trip.count = zext nneg i32 %umax to i64
  br label %.lr.ph152

._crit_edge153:                                   ; preds = %.lr.ph152
  br i1 %.not183, label %._crit_edge153.thread, label %91

82:                                               ; preds = %._crit_edge
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %305

84:                                               ; preds = %79
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %304

86:                                               ; preds = %80
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br label %304

.lr.ph152:                                        ; preds = %.lr.ph152.preheader, %.lr.ph152
  %indvars.iv = phi i64 [ 0, %.lr.ph152.preheader ], [ %indvars.iv.next, %.lr.ph152 ]
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #8
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_ZN13FenwickTree1DIxSt4plusIxEE6updateEix(ptr noundef nonnull align 8 dereferenceable(33) %7, i32 noundef %90, i64 noundef %89)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge153, label %.lr.ph152, !llvm.loop !9

91:                                               ; preds = %._crit_edge153
  %92 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %93 unwind label %100

93:                                               ; preds = %91
  %94 = urem i64 %92, 5
  %95 = sub nuw nsw i64 100, %94
  br label %._crit_edge153.thread

._crit_edge153.thread:                            ; preds = %81, %._crit_edge153, %93
  %96 = phi i64 [ %95, %93 ], [ 0, %._crit_edge153 ], [ 0, %81 ]
  %97 = trunc nuw nsw i64 %96 to i32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %.not184 = icmp eq i64 %96, 0
  br i1 %.not184, label %._crit_edge175, label %.lr.ph174

.lr.ph174:                                        ; preds = %._crit_edge153.thread
  %98 = add nsw i32 %61, -1
  %99 = sext i32 %58 to i64
  %umax190 = call i32 @llvm.umax.i32(i32 %61, i32 1)
  %wide.trip.count192 = zext nneg i32 %umax190 to i64
  %wide.trip.count198 = zext nneg i32 %umax190 to i64
  br label %102

._crit_edge175:                                   ; preds = %260, %._crit_edge153.thread
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %29) #8
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEE6valuesISt5minusIxEEESt6vectorIxSaIxEET_(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %29, ptr noundef nonnull align 8 dereferenceable(33) %7)
          to label %262 unwind label %267

100:                                              ; preds = %91
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %303

102:                                              ; preds = %.lr.ph174, %260
  %.088172 = phi i32 [ 0, %.lr.ph174 ], [ %261, %260 ]
  %103 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %104 unwind label %119

104:                                              ; preds = %102
  %105 = trunc i64 %103 to i32
  %106 = and i32 %105, 3
  switch i32 %106, label %default.unreachable [
    i32 0, label %107
    i32 1, label %125
    i32 2, label %173
    i32 3, label %217
  ]

107:                                              ; preds = %104
  %108 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %109 unwind label %121

109:                                              ; preds = %107
  %110 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %111 unwind label %123

111:                                              ; preds = %109
  %112 = urem i64 %108, %60
  %113 = trunc nuw nsw i64 %112 to i32
  %114 = urem i64 %110, %99
  %115 = add nuw i64 %114, 1
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %112) #8
  %117 = load i64, ptr %116, align 8, !tbaa !5
  %118 = add nsw i64 %117, %115
  store i64 %118, ptr %116, align 8, !tbaa !5
  call void @_ZN13FenwickTree1DIxSt4plusIxEE6updateEix(ptr noundef nonnull align 8 dereferenceable(33) %7, i32 noundef %113, i64 noundef %115)
  call void @_ZN13FenwickTree1DIxSt4plusIxEE6updateEix(ptr noundef nonnull align 8 dereferenceable(33) %8, i32 noundef %113, i64 noundef %115)
  br label %260

119:                                              ; preds = %102
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %302

121:                                              ; preds = %107
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %302

123:                                              ; preds = %109
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %302

125:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  %126 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %127 unwind label %137

127:                                              ; preds = %125
  %128 = urem i64 %126, %60
  %129 = trunc nuw nsw i64 %128 to i32
  store i32 %129, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  %130 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %131 unwind label %139

131:                                              ; preds = %127
  %132 = urem i64 %130, %60
  %133 = trunc nuw nsw i64 %132 to i32
  store i32 %133, ptr %15, align 4, !tbaa !11
  %134 = load i32, ptr %14, align 4, !tbaa !11
  %135 = icmp sgt i32 %134, %133
  br i1 %135, label %136, label %141

136:                                              ; preds = %131
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15) #8
  %.pre = load i32, ptr %14, align 4, !tbaa !11
  %.pre205 = load i32, ptr %15, align 4, !tbaa !11
  br label %141

137:                                              ; preds = %125
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %172

139:                                              ; preds = %127
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %171

141:                                              ; preds = %136, %131
  %142 = phi i32 [ %.pre205, %136 ], [ %133, %131 ]
  %143 = phi i32 [ %.pre, %136 ], [ %134, %131 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  store i64 0, ptr %16, align 8, !tbaa !5
  %.not102167 = icmp sgt i32 %143, %142
  br i1 %.not102167, label %._crit_edge171, label %.lr.ph170.preheader

.lr.ph170.preheader:                              ; preds = %141
  %144 = sext i32 %143 to i64
  br label %.lr.ph170

._crit_edge171:                                   ; preds = %.lr.ph170, %141
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %151 unwind label %164

.lr.ph170:                                        ; preds = %.lr.ph170.preheader, %.lr.ph170
  %indvars.iv200 = phi i64 [ %144, %.lr.ph170.preheader ], [ %indvars.iv.next201, %.lr.ph170 ]
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv200) #8
  %146 = load i64, ptr %145, align 8, !tbaa !5
  %147 = load i64, ptr %16, align 8, !tbaa !5
  %148 = add nsw i64 %147, %146
  store i64 %148, ptr %16, align 8, !tbaa !5
  %indvars.iv.next201 = add nsw i64 %indvars.iv200, 1
  %149 = load i32, ptr %15, align 4, !tbaa !11
  %150 = sext i32 %149 to i64
  %.not102.not = icmp slt i64 %indvars.iv200, %150
  br i1 %.not102.not, label %.lr.ph170, label %._crit_edge171, !llvm.loop !13

151:                                              ; preds = %._crit_edge171
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %152 = load i32, ptr %14, align 4, !tbaa !11
  %153 = load i32, ptr %15, align 4, !tbaa !11
  %154 = invoke noundef i64 @_ZN13FenwickTree1DIxSt4plusIxEE5queryISt5minusIxEEExiiT_(ptr noundef nonnull align 8 dereferenceable(33) %7, i32 noundef %152, i32 noundef %153)
          to label %155 unwind label %166

155:                                              ; preds = %151
  store i64 %154, ptr %17, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %156 unwind label %166

156:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %157 = load i32, ptr %14, align 4, !tbaa !11
  %158 = load i32, ptr %15, align 4, !tbaa !11
  %159 = invoke noundef i64 @_ZN13FenwickTree1DIxSt4plusIxEE5queryISt5minusIxEEExiiT_(ptr noundef nonnull align 8 dereferenceable(33) %8, i32 noundef %157, i32 noundef %158)
          to label %160 unwind label %168

160:                                              ; preds = %156
  store i64 %159, ptr %18, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %161 unwind label %168

161:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(8) %162)
          to label %163 unwind label %164

163:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br label %260

164:                                              ; preds = %161, %._crit_edge171
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %170

166:                                              ; preds = %155, %151
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %170

168:                                              ; preds = %160, %156
  %169 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  br label %170

170:                                              ; preds = %168, %166, %164
  %.pn103 = phi { ptr, i32 } [ %165, %164 ], [ %169, %168 ], [ %167, %166 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %171

171:                                              ; preds = %170, %139
  %.pn103.pn = phi { ptr, i32 } [ %.pn103, %170 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %172

172:                                              ; preds = %171, %137
  %.pn103.pn.pn = phi { ptr, i32 } [ %.pn103.pn, %171 ], [ %138, %137 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br label %302

173:                                              ; preds = %104
  %174 = call noundef i64 @_ZN13FenwickTree1DIxSt4plusIxEE5queryEi(ptr noundef nonnull align 8 dereferenceable(33) %7, i32 noundef %98)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  %175 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %176 unwind label %189

176:                                              ; preds = %173
  %177 = shl nsw i64 %174, 1
  %178 = or disjoint i64 %177, 1
  %179 = urem i64 %175, %178
  store i64 %179, ptr %19, align 8, !tbaa !5
  br i1 %.not183, label %.critedge, label %.lr.ph163

.lr.ph163:                                        ; preds = %176, %185
  %indvars.iv194 = phi i64 [ %indvars.iv.next195, %185 ], [ 0, %176 ]
  %.091160 = phi i64 [ %188, %185 ], [ 0, %176 ]
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv194) #8
  %181 = load i64, ptr %180, align 8, !tbaa !5
  %182 = add nsw i64 %181, %.091160
  %183 = load i64, ptr %19, align 8, !tbaa !5
  %184 = icmp slt i64 %182, %183
  br i1 %184, label %185, label %.critedge.loopexit.split.loop.exit208

185:                                              ; preds = %.lr.ph163
  %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv194) #8
  %187 = load i64, ptr %186, align 8, !tbaa !5
  %188 = add nsw i64 %187, %.091160
  %exitcond199.not = icmp eq i64 %indvars.iv.next195, %wide.trip.count198
  br i1 %exitcond199.not, label %.critedge, label %.lr.ph163, !llvm.loop !14

189:                                              ; preds = %173
  %190 = landingpad { ptr, i32 }
          cleanup
  br label %216

.critedge.loopexit.split.loop.exit208:            ; preds = %.lr.ph163
  %191 = trunc nuw nsw i64 %indvars.iv194 to i32
  br label %.critedge

.critedge:                                        ; preds = %185, %.critedge.loopexit.split.loop.exit208, %176
  %.090.lcssa = phi i32 [ 0, %176 ], [ %191, %.critedge.loopexit.split.loop.exit208 ], [ %umax190, %185 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  %192 = zext nneg i32 %.090.lcssa to i64
  store i64 %192, ptr %20, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %193 unwind label %208

193:                                              ; preds = %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  %194 = load i64, ptr %19, align 8, !tbaa !5
  %195 = invoke noundef i32 @_ZN13FenwickTree1DIxSt4plusIxEE7bsearchISt4lessIxEEEixT_(ptr noundef nonnull align 8 dereferenceable(33) %7, i64 noundef %194)
          to label %196 unwind label %210

196:                                              ; preds = %193
  %197 = sext i32 %195 to i64
  store i64 %197, ptr %21, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %198 unwind label %210

198:                                              ; preds = %196
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  %199 = load i64, ptr %19, align 8, !tbaa !5
  %200 = invoke noundef i32 @_ZN13FenwickTree1DIxSt4plusIxEE7bsearchISt4lessIxEEEixT_(ptr noundef nonnull align 8 dereferenceable(33) %8, i64 noundef %199)
          to label %201 unwind label %212

201:                                              ; preds = %198
  %202 = sext i32 %200 to i64
  store i64 %202, ptr %22, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %203 unwind label %212

203:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #8
  %204 = invoke noundef i32 @"_Z7bsearchILb1EiZ5test2vE3$_0ET0_S1_S1_T1_"(i32 noundef 0, i32 noundef %61, ptr nonnull %8, ptr nonnull %19)
          to label %205 unwind label %214

205:                                              ; preds = %203
  %206 = sext i32 %204 to i64
  store i64 %206, ptr %23, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %207 unwind label %214

207:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  br label %260

208:                                              ; preds = %.critedge
  %209 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  br label %216

210:                                              ; preds = %196, %193
  %211 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  br label %216

212:                                              ; preds = %201, %198
  %213 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  br label %216

214:                                              ; preds = %205, %203
  %215 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  br label %216

216:                                              ; preds = %208, %210, %212, %214, %189
  %.pn99.pn = phi { ptr, i32 } [ %190, %189 ], [ %215, %214 ], [ %213, %212 ], [ %211, %210 ], [ %209, %208 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  br label %302

default.unreachable:                              ; preds = %104
  unreachable

217:                                              ; preds = %104
  %218 = call noundef i64 @_ZN13FenwickTree1DIxSt4plusIxEE5queryEi(ptr noundef nonnull align 8 dereferenceable(33) %7, i32 noundef %98)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #8
  %219 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEclEv(ptr noundef nonnull align 8 dereferenceable(2504) %2)
          to label %220 unwind label %232

220:                                              ; preds = %217
  %221 = shl nsw i64 %218, 1
  %222 = or disjoint i64 %221, 1
  %223 = urem i64 %219, %222
  store i64 %223, ptr %24, align 8, !tbaa !5
  br i1 %.not183, label %.critedge2, label %.lr.ph157

.lr.ph157:                                        ; preds = %220, %228
  %indvars.iv188 = phi i64 [ %indvars.iv.next189, %228 ], [ 0, %220 ]
  %.086155 = phi i64 [ %231, %228 ], [ 0, %220 ]
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv188) #8
  %225 = load i64, ptr %224, align 8, !tbaa !5
  %226 = add nsw i64 %225, %.086155
  %227 = load i64, ptr %24, align 8, !tbaa !5
  %.not = icmp sgt i64 %226, %227
  br i1 %.not, label %.critedge2.loopexit.split.loop.exit206, label %228

228:                                              ; preds = %.lr.ph157
  %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv188) #8
  %230 = load i64, ptr %229, align 8, !tbaa !5
  %231 = add nsw i64 %230, %.086155
  %exitcond193.not = icmp eq i64 %indvars.iv.next189, %wide.trip.count192
  br i1 %exitcond193.not, label %.critedge2, label %.lr.ph157, !llvm.loop !15

232:                                              ; preds = %217
  %233 = landingpad { ptr, i32 }
          cleanup
  br label %259

.critedge2.loopexit.split.loop.exit206:           ; preds = %.lr.ph157
  %234 = trunc nuw nsw i64 %indvars.iv188 to i32
  br label %.critedge2

.critedge2:                                       ; preds = %228, %.critedge2.loopexit.split.loop.exit206, %220
  %.087.lcssa = phi i32 [ 0, %220 ], [ %234, %.critedge2.loopexit.split.loop.exit206 ], [ %umax190, %228 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #8
  %235 = zext nneg i32 %.087.lcssa to i64
  store i64 %235, ptr %25, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %236 unwind label %251

236:                                              ; preds = %.critedge2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #8
  %237 = load i64, ptr %24, align 8, !tbaa !5
  %238 = invoke noundef i32 @_ZN13FenwickTree1DIxSt4plusIxEE7bsearchISt10less_equalIxEEEixT_(ptr noundef nonnull align 8 dereferenceable(33) %7, i64 noundef %237)
          to label %239 unwind label %253

239:                                              ; preds = %236
  %240 = sext i32 %238 to i64
  store i64 %240, ptr %26, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %241 unwind label %253

241:                                              ; preds = %239
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #8
  %242 = load i64, ptr %24, align 8, !tbaa !5
  %243 = invoke noundef i32 @_ZN13FenwickTree1DIxSt4plusIxEE7bsearchISt10less_equalIxEEEixT_(ptr noundef nonnull align 8 dereferenceable(33) %8, i64 noundef %242)
          to label %244 unwind label %255

244:                                              ; preds = %241
  %245 = sext i32 %243 to i64
  store i64 %245, ptr %27, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %246 unwind label %255

246:                                              ; preds = %244
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #8
  %247 = invoke noundef i32 @"_Z7bsearchILb1EiZ5test2vE3$_1ET0_S1_S1_T1_"(i32 noundef 0, i32 noundef %61, ptr nonnull %8, ptr nonnull %24)
          to label %248 unwind label %257

248:                                              ; preds = %246
  %249 = sext i32 %247 to i64
  store i64 %249, ptr %28, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %250 unwind label %257

250:                                              ; preds = %248
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  br label %260

251:                                              ; preds = %.critedge2
  %252 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  br label %259

253:                                              ; preds = %239, %236
  %254 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  br label %259

255:                                              ; preds = %244, %241
  %256 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  br label %259

257:                                              ; preds = %248, %246
  %258 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #8
  br label %259

259:                                              ; preds = %251, %253, %255, %257, %232
  %.pn96.pn = phi { ptr, i32 } [ %233, %232 ], [ %258, %257 ], [ %256, %255 ], [ %254, %253 ], [ %252, %251 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  br label %302

260:                                              ; preds = %163, %250, %207, %111
  %261 = add nuw nsw i32 %.088172, 1
  %exitcond203.not = icmp eq i32 %261, %97
  br i1 %exitcond203.not, label %._crit_edge175, label %102, !llvm.loop !16

262:                                              ; preds = %._crit_edge175
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %30) #8
  invoke void @_ZN13FenwickTree1DIxSt4plusIxEE6valuesISt5minusIxEEESt6vectorIxSaIxEET_(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %30, ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %263 unwind label %269

263:                                              ; preds = %262
  %264 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %265 unwind label %271

265:                                              ; preds = %263
  br i1 %264, label %273, label %266

266:                                              ; preds = %265
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 119, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5test2v) #9
  unreachable

267:                                              ; preds = %._crit_edge175
  %268 = landingpad { ptr, i32 }
          cleanup
  br label %301

269:                                              ; preds = %262
  %270 = landingpad { ptr, i32 }
          cleanup
  br label %300

271:                                              ; preds = %285, %281, %277, %273, %263
  %272 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  br label %300

273:                                              ; preds = %265
  %274 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %275 unwind label %271

275:                                              ; preds = %273
  br i1 %274, label %277, label %276

276:                                              ; preds = %275
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 120, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5test2v) #9
  unreachable

277:                                              ; preds = %275
  %278 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %279 unwind label %271

279:                                              ; preds = %277
  br i1 %278, label %281, label %280

280:                                              ; preds = %279
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 121, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5test2v) #9
  unreachable

281:                                              ; preds = %279
  %282 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %29)
          to label %283 unwind label %271

283:                                              ; preds = %281
  br i1 %282, label %285, label %284

284:                                              ; preds = %283
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 122, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5test2v) #9
  unreachable

285:                                              ; preds = %283
  %286 = invoke noundef zeroext i1 @_ZSteqIxSaIxEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %287 unwind label %271

287:                                              ; preds = %285
  br i1 %286, label %289, label %288

288:                                              ; preds = %287
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 123, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5test2v) #9
  unreachable

289:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #8
  %290 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  store ptr %290, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #8
  %291 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  store ptr %291, ptr %32, align 8
  %292 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  br i1 %292, label %.lr.ph178, label %._crit_edge179

._crit_edge179:                                   ; preds = %.lr.ph178, %289
  %.1.lcssa = phi i64 [ %.0182, %289 ], [ %297, %.lr.ph178 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %30) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %29) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #8
  call void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %7) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  %293 = add nuw nsw i32 %.065181, 1
  %exitcond204.not = icmp eq i32 %293, 100000
  br i1 %exitcond204.not, label %36, label %54, !llvm.loop !17

.lr.ph178:                                        ; preds = %289, %.lr.ph178
  %.1176 = phi i64 [ %297, %.lr.ph178 ], [ %.0182, %289 ]
  %294 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  %295 = mul nsw i64 %.1176, 31
  %296 = load i64, ptr %294, align 8, !tbaa !5
  %297 = add nsw i64 %296, %295
  %298 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  %299 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  br i1 %299, label %.lr.ph178, label %._crit_edge179

300:                                              ; preds = %271, %269
  %.pn = phi { ptr, i32 } [ %272, %271 ], [ %270, %269 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %30) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #8
  br label %301

301:                                              ; preds = %300, %267
  %.pn.pn = phi { ptr, i32 } [ %.pn, %300 ], [ %268, %267 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %29) #8
  br label %302

302:                                              ; preds = %119, %172, %216, %259, %123, %121, %301
  %.pn107.pn.pn = phi { ptr, i32 } [ %.pn.pn, %301 ], [ %.pn103.pn.pn, %172 ], [ %.pn99.pn, %216 ], [ %.pn96.pn, %259 ], [ %120, %119 ], [ %124, %123 ], [ %122, %121 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  br label %303

303:                                              ; preds = %302, %100
  %.pn107.pn.pn.pn = phi { ptr, i32 } [ %.pn107.pn.pn, %302 ], [ %101, %100 ]
  call void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #8
  br label %304

304:                                              ; preds = %303, %86, %84
  %.pn107.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn107.pn.pn.pn, %303 ], [ %87, %86 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #8
  call void @_ZN13FenwickTree1DIxSt4plusIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %7) #8
  br label %305

305:                                              ; preds = %304, %82
  %.pn107.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn107.pn.pn.pn.pn, %304 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #8
  br label %306

306:                                              ; preds = %305, %77
  %.pn114 = phi { ptr, i32 } [ %78, %77 ], [ %.pn107.pn.pn.pn.pn.pn, %305 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  br label %307

307:                                              ; preds = %306, %67
  %.pn114.pn = phi { ptr, i32 } [ %.pn114, %306 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 2504, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn114.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIimEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i64 noundef) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @"_Z7bsearchILb1EiZ5test2vE3$_0ET0_S1_S1_T1_"(i32 noundef, i32 noundef, ptr, ptr) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @"_Z7bsearchILb1EiZ5test2vE3$_1ET0_S1_S1_T1_"(i32 noundef, i32 noundef, ptr, ptr) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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