; LLVM IR from ouuan/CPTH :: tests/HLD (HLD)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.13" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.16" = type { ptr }
%"class.CPTH::HLD" = type { i8, i64, i64, %"class.std::vector", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr, ptr }
%"class.CPTH::SegmentTree" = type { %"class.std::function.17", %"class.std::function.19", %"class.std::vector.22", i64, i64, i32, i32 }
%"class.std::function.17" = type { %"class.std::_Function_base", ptr }
%"class.std::function.19" = type { %"class.std::_Function_base", ptr }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<CPTH::SegmentTreeNode<int, int>, std::allocator<CPTH::SegmentTreeNode<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<CPTH::SegmentTreeNode<int, int>, std::allocator<CPTH::SegmentTreeNode<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<CPTH::SegmentTreeNode<int, int>, std::allocator<CPTH::SegmentTreeNode<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CPTH::SegmentTreeNode<int, int>, std::allocator<CPTH::SegmentTreeNode<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon.27 = type { ptr }
%class.anon.28 = type { ptr }
%"class.__gnu_cxx::__normal_iterator.29" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [62 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector.11", align 8
  %7 = alloca %"class.std::allocator.13", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.16", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.16", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.CPTH::HLD", align 8
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.std::vector.0", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::pair", align 8
  %31 = alloca ptr, align 8
  %32 = alloca %"class.std::vector.0", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca i64, align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca %"class.std::function", align 8
  %39 = alloca %class.anon, align 8
  %40 = alloca %"class.std::vector.11", align 8
  %41 = alloca %"class.std::allocator.13", align 1
  %42 = alloca i32, align 4
  %43 = alloca %"class.CPTH::SegmentTree", align 8
  %44 = alloca %"class.std::function.17", align 8
  %45 = alloca %class.anon.27, align 8
  %46 = alloca %"class.std::function.19", align 8
  %47 = alloca %class.anon.28, align 8
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca ptr, align 8
  %56 = alloca %"class.std::vector.6", align 8
  %57 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %58 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %59 = alloca %"struct.std::pair", align 8
  %60 = alloca i32, align 4
  %61 = alloca ptr, align 8
  %62 = alloca %"class.std::vector.6", align 8
  %63 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %64 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %65 = alloca %"struct.std::pair", align 8
  %66 = alloca i32, align 4
  %67 = alloca i32, align 4
  %68 = alloca i32, align 4
  %69 = alloca i32, align 4
  %70 = alloca ptr, align 8
  %71 = alloca %"class.std::vector.6", align 8
  %72 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %73 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %74 = alloca %"struct.std::pair", align 8
  %75 = alloca i32, align 4
  %76 = alloca %"struct.std::pair", align 8
  %77 = alloca i32, align 4
  %78 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %80, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %81, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #9
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %84, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %85 unwind label %95

85:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  store ptr %6, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %86 = load ptr, ptr %10, align 8, !tbaa !9
  %87 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %86) #9
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.16", ptr %11, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %89 = load ptr, ptr %10, align 8, !tbaa !9
  %90 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #9
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.16", ptr %12, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  br label %92

92:                                               ; preds = %108, %85
  %93 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  br i1 %93, label %99, label %94

94:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %114

95:                                               ; preds = %0
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %8, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  br label %680

99:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  store ptr %100, ptr %13, align 8, !tbaa !9
  %101 = load ptr, ptr %13, align 8, !tbaa !9
  %102 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %101)
          to label %103 unwind label %110

103:                                              ; preds = %99
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = load ptr, ptr %13, align 8, !tbaa !9
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = srem i32 %106, %104
  store i32 %107, ptr %105, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %108

108:                                              ; preds = %103
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  br label %92

110:                                              ; preds = %99
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %8, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %679

114:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 264, ptr %14) #9
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  invoke void @_ZN4CPTH3HLDC1Em(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %116)
          to label %117 unwind label %127

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #9
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #9
  call void @_ZNSaISt6vectorImSaImEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  invoke void @_ZNSt6vectorIS_ImSaImEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %120, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %121 unwind label %131

121:                                              ; preds = %117
  call void @_ZNSt15__new_allocatorISt6vectorImSaImEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %157, %121
  %123 = load i32, ptr %17, align 4, !tbaa !5
  %124 = load i32, ptr %2, align 4, !tbaa !5
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %135, label %126

126:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %173

127:                                              ; preds = %114
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %8, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %9, align 4
  br label %678

131:                                              ; preds = %117
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %8, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt6vectorImSaImEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #9
  br label %677

135:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %136 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %137 unwind label %160

137:                                              ; preds = %135
  %138 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %136, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %139 unwind label %160

139:                                              ; preds = %137
  %140 = load i32, ptr %18, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = load i32, ptr %19, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  invoke void @_ZN4CPTH3HLD7addEdgeEmm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %141, i64 noundef %143)
          to label %144 unwind label %160

144:                                              ; preds = %139
  %145 = load i32, ptr %18, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %146) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %148 = load i32, ptr %19, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  store i64 %149, ptr %20, align 8, !tbaa !11
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %147, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %150 unwind label %164

150:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  %151 = load i32, ptr %19, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %152) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %154 = load i32, ptr %18, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  store i64 %155, ptr %21, align 8, !tbaa !11
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %153, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %156 unwind label %168

156:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %17, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %17, align 4, !tbaa !5
  br label %122, !llvm.loop !13

160:                                              ; preds = %139, %137, %135
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %8, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %9, align 4
  br label %172

164:                                              ; preds = %144
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %8, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %172

168:                                              ; preds = %150
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %8, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %172

172:                                              ; preds = %168, %164, %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %676

173:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %230, %173
  %175 = load i32, ptr %22, align 4, !tbaa !5
  %176 = load i32, ptr %2, align 4, !tbaa !5
  %177 = icmp sle i32 %175, %176
  br i1 %177, label %179, label %178

178:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %235

179:                                              ; preds = %174
  %180 = load i32, ptr %22, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %181) #9
  %183 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %182) #9
  %184 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %183, ptr %184, align 8
  %185 = load i32, ptr %22, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %186) #9
  %188 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %187) #9
  %189 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %188, ptr %189, align 8
  %190 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8
  %192 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEEEvT_S7_(ptr %191, ptr %193)
          to label %194 unwind label %216

194:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #9
  %195 = load i32, ptr %22, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4CPTH3HLD8adjacentEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %196)
          to label %198 unwind label %220

198:                                              ; preds = %194
  invoke void @_ZNSt6vectorImSaImEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %197)
          to label %199 unwind label %220

199:                                              ; preds = %198
  %200 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  %201 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %200, ptr %201, align 8
  %202 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  %203 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %202, ptr %203, align 8
  %204 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  %205 = load ptr, ptr %204, align 8
  %206 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  %207 = load ptr, ptr %206, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEEEvT_S7_(ptr %205, ptr %207)
          to label %208 unwind label %224

208:                                              ; preds = %199
  %209 = load i32, ptr %22, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %210) #9
  %212 = invoke noundef zeroext i1 @_ZSteqImSaImEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %211, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %213 unwind label %224

213:                                              ; preds = %208
  br i1 %212, label %214, label %215

214:                                              ; preds = %213
  br label %229

215:                                              ; preds = %213
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.10, i32 noundef 40, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

216:                                              ; preds = %179
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %8, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %9, align 4
  br label %234

220:                                              ; preds = %198, %194
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %8, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %9, align 4
  br label %233

224:                                              ; preds = %208, %199
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %8, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %9, align 4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  br label %233

228:                                              ; No predecessors!
  br label %229

229:                                              ; preds = %228, %214
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #9
  br label %230

230:                                              ; preds = %229
  %231 = load i32, ptr %22, align 4, !tbaa !5
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %22, align 4, !tbaa !5
  br label %174, !llvm.loop !15

233:                                              ; preds = %224, %220
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #9
  br label %234

234:                                              ; preds = %233, %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %676

235:                                              ; preds = %178
  invoke void @_ZN4CPTH3HLD5buildEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef 1)
          to label %236 unwind label %242

236:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 1, ptr %28, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %345, %236
  %238 = load i32, ptr %28, align 4, !tbaa !5
  %239 = load i32, ptr %2, align 4, !tbaa !5
  %240 = icmp sle i32 %238, %239
  br i1 %240, label %246, label %241

241:                                              ; preds = %237
  store i32 10, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %349

242:                                              ; preds = %235
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %8, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %9, align 4
  br label %676

246:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #9
  %247 = load i32, ptr %28, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = invoke { i64, i64 } @_ZNK4CPTH3HLD7subtreeEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %248)
          to label %250 unwind label %268

250:                                              ; preds = %246
  %251 = getelementptr inbounds { i64, i64 }, ptr %30, i32 0, i32 0
  %252 = extractvalue { i64, i64 } %249, 0
  store i64 %252, ptr %251, align 8
  %253 = getelementptr inbounds { i64, i64 }, ptr %30, i32 0, i32 1
  %254 = extractvalue { i64, i64 } %249, 1
  store i64 %254, ptr %253, align 8
  %255 = load i32, ptr %28, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = invoke noundef i64 @_ZNK4CPTH3HLD4sizeEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %256)
          to label %258 unwind label %268

258:                                              ; preds = %250
  %259 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 1
  %260 = load i64, ptr %259, align 8, !tbaa !16
  %261 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 0
  %262 = load i64, ptr %261, align 8, !tbaa !18
  %263 = sub i64 %260, %262
  %264 = add i64 %263, 1
  %265 = icmp eq i64 %257, %264
  br i1 %265, label %266, label %267

266:                                              ; preds = %258
  br label %273

267:                                              ; preds = %258
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.10, i32 noundef 48, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

268:                                              ; preds = %294, %290, %286, %276, %250, %246
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %8, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %9, align 4
  br label %348

272:                                              ; No predecessors!
  br label %273

273:                                              ; preds = %272, %266
  %274 = load i32, ptr %28, align 4, !tbaa !5
  %275 = icmp eq i32 %274, 1
  br i1 %275, label %276, label %286

276:                                              ; preds = %273
  %277 = load i32, ptr %28, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = invoke noundef i64 @_ZNK4CPTH3HLD5depthEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %278)
          to label %280 unwind label %268

280:                                              ; preds = %276
  %281 = icmp eq i64 %279, 0
  br i1 %281, label %282, label %283

282:                                              ; preds = %280
  br label %285

283:                                              ; preds = %280
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.10, i32 noundef 50, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

284:                                              ; No predecessors!
  br label %285

285:                                              ; preds = %284, %282
  br label %303

286:                                              ; preds = %273
  %287 = load i32, ptr %28, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = invoke noundef i64 @_ZNK4CPTH3HLD5depthEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %288)
          to label %290 unwind label %268

290:                                              ; preds = %286
  %291 = load i32, ptr %28, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = invoke noundef i64 @_ZNK4CPTH3HLD6parentEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %292)
          to label %294 unwind label %268

294:                                              ; preds = %290
  %295 = invoke noundef i64 @_ZNK4CPTH3HLD5depthEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %293)
          to label %296 unwind label %268

296:                                              ; preds = %294
  %297 = add i64 %295, 1
  %298 = icmp eq i64 %289, %297
  br i1 %298, label %299, label %300

299:                                              ; preds = %296
  br label %302

300:                                              ; preds = %296
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.10, i32 noundef 52, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

301:                                              ; No predecessors!
  br label %302

302:                                              ; preds = %301, %299
  br label %303

303:                                              ; preds = %302, %285
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #9
  %304 = load i32, ptr %28, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  invoke void @_ZNK4CPTH3HLD8childrenEm(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %32, ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %305)
          to label %306 unwind label %316

306:                                              ; preds = %303
  store ptr %32, ptr %31, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  %307 = load ptr, ptr %31, align 8, !tbaa !9
  %308 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %307) #9
  %309 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %308, ptr %309, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %310 = load ptr, ptr %31, align 8, !tbaa !9
  %311 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %310) #9
  %312 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %311, ptr %312, align 8
  br label %313

313:                                              ; preds = %341, %306
  %314 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #9
  br i1 %314, label %320, label %315

315:                                              ; preds = %313
  store i32 13, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  br label %344

316:                                              ; preds = %303
  %317 = landingpad { ptr, i32 }
          cleanup
  %318 = extractvalue { ptr, i32 } %317, 0
  store ptr %318, ptr %8, align 8
  %319 = extractvalue { ptr, i32 } %317, 1
  store i32 %319, ptr %9, align 4
  br label %343

320:                                              ; preds = %313
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  %321 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  %322 = load i64, ptr %321, align 8, !tbaa !11
  store i64 %322, ptr %35, align 8, !tbaa !11
  %323 = load i64, ptr %35, align 8, !tbaa !11
  %324 = invoke noundef i64 @_ZNK4CPTH3HLD4sizeEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %323)
          to label %325 unwind label %335

325:                                              ; preds = %320
  %326 = load i32, ptr %28, align 4, !tbaa !5
  %327 = sext i32 %326 to i64
  %328 = invoke noundef i64 @_ZNK4CPTH3HLD10heavyChildEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %327)
          to label %329 unwind label %335

329:                                              ; preds = %325
  %330 = invoke noundef i64 @_ZNK4CPTH3HLD4sizeEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %328)
          to label %331 unwind label %335

331:                                              ; preds = %329
  %332 = icmp ule i64 %324, %330
  br i1 %332, label %333, label %334

333:                                              ; preds = %331
  br label %340

334:                                              ; preds = %331
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.10, i32 noundef 54, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

335:                                              ; preds = %329, %325, %320
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %8, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #9
  br label %343

339:                                              ; No predecessors!
  br label %340

340:                                              ; preds = %339, %333
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  br label %341

341:                                              ; preds = %340
  %342 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  br label %313

343:                                              ; preds = %335, %316
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  br label %348

344:                                              ; preds = %315
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #9
  br label %345

345:                                              ; preds = %344
  %346 = load i32, ptr %28, align 4, !tbaa !5
  %347 = add nsw i32 %346, 1
  store i32 %347, ptr %28, align 4, !tbaa !5
  br label %237, !llvm.loop !19

348:                                              ; preds = %343, %268
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %676

349:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  store i32 1, ptr %36, align 4, !tbaa !5
  br label %350

350:                                              ; preds = %358, %349
  %351 = load i32, ptr %36, align 4, !tbaa !5
  %352 = icmp sle i32 %351, 10000000
  br i1 %352, label %354, label %353

353:                                              ; preds = %350
  store i32 15, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %365

354:                                              ; preds = %350
  %355 = load i32, ptr %4, align 4, !tbaa !5
  %356 = sext i32 %355 to i64
  invoke void @_ZN4CPTH3HLD5buildEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %356)
          to label %357 unwind label %361

357:                                              ; preds = %354
  br label %358

358:                                              ; preds = %357
  %359 = load i32, ptr %36, align 4, !tbaa !5
  %360 = add nsw i32 %359, 1
  store i32 %360, ptr %36, align 4, !tbaa !5
  br label %350, !llvm.loop !20

361:                                              ; preds = %354
  %362 = landingpad { ptr, i32 }
          cleanup
  %363 = extractvalue { ptr, i32 } %362, 0
  store ptr %363, ptr %8, align 8
  %364 = extractvalue { ptr, i32 } %362, 1
  store i32 %364, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %676

365:                                              ; preds = %353
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  store i32 0, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %39) #9
  %366 = getelementptr inbounds %class.anon, ptr %39, i32 0, i32 0
  store ptr %14, ptr %366, align 8, !tbaa !9
  %367 = getelementptr inbounds %class.anon, ptr %39, i32 0, i32 1
  store ptr %37, ptr %367, align 8, !tbaa !9
  %368 = getelementptr inbounds %class.anon, ptr %39, i32 0, i32 2
  store ptr %38, ptr %368, align 8, !tbaa !9
  invoke void @"_ZNSt8functionIFviEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 8 dereferenceable(24) %39)
          to label %369 unwind label %377

369:                                              ; preds = %365
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #9
  %370 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %38, i32 noundef %370)
          to label %371 unwind label %381

371:                                              ; preds = %369
  %372 = load i32, ptr %37, align 4, !tbaa !5
  %373 = load i32, ptr %2, align 4, !tbaa !5
  %374 = icmp eq i32 %372, %373
  br i1 %374, label %375, label %376

375:                                              ; preds = %371
  br label %386

376:                                              ; preds = %371
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.10, i32 noundef 78, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

377:                                              ; preds = %365
  %378 = landingpad { ptr, i32 }
          cleanup
  %379 = extractvalue { ptr, i32 } %378, 0
  store ptr %379, ptr %8, align 8
  %380 = extractvalue { ptr, i32 } %378, 1
  store i32 %380, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #9
  br label %675

381:                                              ; preds = %369
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %8, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %9, align 4
  br label %674

385:                                              ; No predecessors!
  br label %386

386:                                              ; preds = %385, %375
  call void @llvm.lifetime.start.p0(i64 24, ptr %40) #9
  %387 = load i32, ptr %2, align 4, !tbaa !5
  %388 = sext i32 %387 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %41) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %388, ptr noundef nonnull align 1 dereferenceable(1) %41)
          to label %389 unwind label %395

389:                                              ; preds = %386
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  store i32 1, ptr %42, align 4, !tbaa !5
  br label %390

390:                                              ; preds = %411, %389
  %391 = load i32, ptr %42, align 4, !tbaa !5
  %392 = load i32, ptr %2, align 4, !tbaa !5
  %393 = icmp sle i32 %391, %392
  br i1 %393, label %399, label %394

394:                                              ; preds = %390
  store i32 18, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %418

395:                                              ; preds = %386
  %396 = landingpad { ptr, i32 }
          cleanup
  %397 = extractvalue { ptr, i32 } %396, 0
  store ptr %397, ptr %8, align 8
  %398 = extractvalue { ptr, i32 } %396, 1
  store i32 %398, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #9
  br label %673

399:                                              ; preds = %390
  %400 = load i32, ptr %42, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = invoke noundef i64 @_ZNK4CPTH3HLD4atIdEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %401)
          to label %403 unwind label %414

403:                                              ; preds = %399
  %404 = sub i64 %402, 1
  %405 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %404) #9
  %406 = load i32, ptr %405, align 4, !tbaa !5
  %407 = load i32, ptr %42, align 4, !tbaa !5
  %408 = sub nsw i32 %407, 1
  %409 = sext i32 %408 to i64
  %410 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %409) #9
  store i32 %406, ptr %410, align 4, !tbaa !5
  br label %411

411:                                              ; preds = %403
  %412 = load i32, ptr %42, align 4, !tbaa !5
  %413 = add nsw i32 %412, 1
  store i32 %413, ptr %42, align 4, !tbaa !5
  br label %390, !llvm.loop !21

414:                                              ; preds = %399
  %415 = landingpad { ptr, i32 }
          cleanup
  %416 = extractvalue { ptr, i32 } %415, 0
  store ptr %416, ptr %8, align 8
  %417 = extractvalue { ptr, i32 } %415, 1
  store i32 %417, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %672

418:                                              ; preds = %394
  call void @llvm.lifetime.start.p0(i64 112, ptr %43) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #9
  %419 = getelementptr inbounds %class.anon.27, ptr %45, i32 0, i32 0
  store ptr %5, ptr %419, align 8, !tbaa !9
  call void @"_ZNSt8functionIFiRKiS1_EEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr noundef nonnull align 8 dereferenceable(8) %45) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #9
  %420 = getelementptr inbounds %class.anon.28, ptr %47, i32 0, i32 0
  store ptr %5, ptr %420, align 8, !tbaa !9
  call void @"_ZNSt8functionIFvRN4CPTH15SegmentTreeNodeIiiEERKiEEC2IZ4mainE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef nonnull align 8 dereferenceable(8) %47) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  store i32 0, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #9
  store i32 0, ptr %49, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EEC2ERKSt6vectorIiSaIiEESt8functionIFiRKiS9_EES7_IFvRNS_15SegmentTreeNodeIiiEES9_EExS9_S9_(ptr noundef nonnull align 8 dereferenceable(112) %43, ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef %44, ptr noundef %46, i64 noundef 1, ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %421 unwind label %432

421:                                              ; preds = %418
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  br label %422

422:                                              ; preds = %667, %421
  %423 = load i32, ptr %3, align 4, !tbaa !5
  %424 = add nsw i32 %423, -1
  store i32 %424, ptr %3, align 4, !tbaa !5
  %425 = icmp ne i32 %423, 0
  br i1 %425, label %426, label %669

426:                                              ; preds = %422
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #9
  %427 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %428 unwind label %436

428:                                              ; preds = %426
  %429 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %427, ptr noundef nonnull align 4 dereferenceable(4) %51)
          to label %430 unwind label %436

430:                                              ; preds = %428
  %431 = load i32, ptr %50, align 4, !tbaa !5
  switch i32 %431, label %667 [
    i32 1, label %440
    i32 2, label %552
    i32 3, label %609
    i32 4, label %643
  ]

432:                                              ; preds = %418
  %433 = landingpad { ptr, i32 }
          cleanup
  %434 = extractvalue { ptr, i32 } %433, 0
  store ptr %434, ptr %8, align 8
  %435 = extractvalue { ptr, i32 } %433, 1
  store i32 %435, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  br label %671

436:                                              ; preds = %428, %426
  %437 = landingpad { ptr, i32 }
          cleanup
  %438 = extractvalue { ptr, i32 } %437, 0
  store ptr %438, ptr %8, align 8
  %439 = extractvalue { ptr, i32 } %437, 1
  store i32 %439, ptr %9, align 4
  br label %668

440:                                              ; preds = %430
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #9
  %441 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %52)
          to label %442 unwind label %466

442:                                              ; preds = %440
  %443 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %441, ptr noundef nonnull align 4 dereferenceable(4) %53)
          to label %444 unwind label %466

444:                                              ; preds = %442
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #9
  %445 = load i32, ptr %51, align 4, !tbaa !5
  %446 = sext i32 %445 to i64
  %447 = load i32, ptr %52, align 4, !tbaa !5
  %448 = sext i32 %447 to i64
  %449 = invoke noundef i64 @_ZNK4CPTH3HLD3lcaEmm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %446, i64 noundef %448)
          to label %450 unwind label %470

450:                                              ; preds = %444
  %451 = trunc i64 %449 to i32
  store i32 %451, ptr %54, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %56) #9
  %452 = load i32, ptr %51, align 4, !tbaa !5
  %453 = sext i32 %452 to i64
  %454 = load i32, ptr %54, align 4, !tbaa !5
  %455 = sext i32 %454 to i64
  invoke void @_ZNK4CPTH3HLD4pathEmm(ptr dead_on_unwind writable sret(%"class.std::vector.6") align 8 %56, ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %453, i64 noundef %455)
          to label %456 unwind label %474

456:                                              ; preds = %450
  store ptr %56, ptr %55, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #9
  %457 = load ptr, ptr %55, align 8, !tbaa !9
  %458 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %457) #9
  %459 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %57, i32 0, i32 0
  store ptr %458, ptr %459, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #9
  %460 = load ptr, ptr %55, align 8, !tbaa !9
  %461 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %460) #9
  %462 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %58, i32 0, i32 0
  store ptr %461, ptr %462, align 8
  br label %463

463:                                              ; preds = %489, %456
  %464 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %58) #9
  br i1 %464, label %478, label %465

465:                                              ; preds = %463
  store i32 24, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #9
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %56) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #9
  br label %496

466:                                              ; preds = %442, %440
  %467 = landingpad { ptr, i32 }
          cleanup
  %468 = extractvalue { ptr, i32 } %467, 0
  store ptr %468, ptr %8, align 8
  %469 = extractvalue { ptr, i32 } %467, 1
  store i32 %469, ptr %9, align 4
  br label %551

470:                                              ; preds = %533, %444
  %471 = landingpad { ptr, i32 }
          cleanup
  %472 = extractvalue { ptr, i32 } %471, 0
  store ptr %472, ptr %8, align 8
  %473 = extractvalue { ptr, i32 } %471, 1
  store i32 %473, ptr %9, align 4
  br label %550

474:                                              ; preds = %450
  %475 = landingpad { ptr, i32 }
          cleanup
  %476 = extractvalue { ptr, i32 } %475, 0
  store ptr %476, ptr %8, align 8
  %477 = extractvalue { ptr, i32 } %475, 1
  store i32 %477, ptr %9, align 4
  br label %495

478:                                              ; preds = %463
  call void @llvm.lifetime.start.p0(i64 16, ptr %59) #9
  %479 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %59, ptr align 8 %479, i64 16, i1 false)
  %480 = getelementptr inbounds %"struct.std::pair", ptr %59, i32 0, i32 0
  %481 = load i64, ptr %480, align 8, !tbaa !18
  %482 = getelementptr inbounds %"struct.std::pair", ptr %59, i32 0, i32 1
  %483 = load i64, ptr %482, align 8, !tbaa !16
  %484 = add i64 %483, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #9
  %485 = load i32, ptr %53, align 4, !tbaa !5
  %486 = load i32, ptr %5, align 4, !tbaa !5
  %487 = srem i32 %485, %486
  store i32 %487, ptr %60, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EE6modifyExxRKi(ptr noundef nonnull align 8 dereferenceable(112) %43, i64 noundef %481, i64 noundef %484, ptr noundef nonnull align 4 dereferenceable(4) %60)
          to label %488 unwind label %491

488:                                              ; preds = %478
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #9
  br label %489

489:                                              ; preds = %488
  %490 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #9
  br label %463

491:                                              ; preds = %478
  %492 = landingpad { ptr, i32 }
          cleanup
  %493 = extractvalue { ptr, i32 } %492, 0
  store ptr %493, ptr %8, align 8
  %494 = extractvalue { ptr, i32 } %492, 1
  store i32 %494, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #9
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %56) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %56) #9
  br label %495

495:                                              ; preds = %491, %474
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #9
  br label %550

496:                                              ; preds = %465
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %62) #9
  %497 = load i32, ptr %52, align 4, !tbaa !5
  %498 = sext i32 %497 to i64
  %499 = load i32, ptr %54, align 4, !tbaa !5
  %500 = sext i32 %499 to i64
  invoke void @_ZNK4CPTH3HLD4pathEmm(ptr dead_on_unwind writable sret(%"class.std::vector.6") align 8 %62, ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %498, i64 noundef %500)
          to label %501 unwind label %511

501:                                              ; preds = %496
  store ptr %62, ptr %61, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #9
  %502 = load ptr, ptr %61, align 8, !tbaa !9
  %503 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %502) #9
  %504 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %63, i32 0, i32 0
  store ptr %503, ptr %504, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #9
  %505 = load ptr, ptr %61, align 8, !tbaa !9
  %506 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %505) #9
  %507 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %64, i32 0, i32 0
  store ptr %506, ptr %507, align 8
  br label %508

508:                                              ; preds = %526, %501
  %509 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 8 dereferenceable(8) %64) #9
  br i1 %509, label %515, label %510

510:                                              ; preds = %508
  store i32 26, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #9
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %62) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %62) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #9
  br label %533

511:                                              ; preds = %496
  %512 = landingpad { ptr, i32 }
          cleanup
  %513 = extractvalue { ptr, i32 } %512, 0
  store ptr %513, ptr %8, align 8
  %514 = extractvalue { ptr, i32 } %512, 1
  store i32 %514, ptr %9, align 4
  br label %532

515:                                              ; preds = %508
  call void @llvm.lifetime.start.p0(i64 16, ptr %65) #9
  %516 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %63) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %65, ptr align 8 %516, i64 16, i1 false)
  %517 = getelementptr inbounds %"struct.std::pair", ptr %65, i32 0, i32 0
  %518 = load i64, ptr %517, align 8, !tbaa !18
  %519 = getelementptr inbounds %"struct.std::pair", ptr %65, i32 0, i32 1
  %520 = load i64, ptr %519, align 8, !tbaa !16
  %521 = add i64 %520, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #9
  %522 = load i32, ptr %53, align 4, !tbaa !5
  %523 = load i32, ptr %5, align 4, !tbaa !5
  %524 = srem i32 %522, %523
  store i32 %524, ptr %66, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EE6modifyExxRKi(ptr noundef nonnull align 8 dereferenceable(112) %43, i64 noundef %518, i64 noundef %521, ptr noundef nonnull align 4 dereferenceable(4) %66)
          to label %525 unwind label %528

525:                                              ; preds = %515
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #9
  br label %526

526:                                              ; preds = %525
  %527 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %63) #9
  br label %508

528:                                              ; preds = %515
  %529 = landingpad { ptr, i32 }
          cleanup
  %530 = extractvalue { ptr, i32 } %529, 0
  store ptr %530, ptr %8, align 8
  %531 = extractvalue { ptr, i32 } %529, 1
  store i32 %531, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #9
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %62) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %62) #9
  br label %532

532:                                              ; preds = %528, %511
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #9
  br label %550

533:                                              ; preds = %510
  %534 = load i32, ptr %54, align 4, !tbaa !5
  %535 = sext i32 %534 to i64
  %536 = invoke noundef i64 @_ZNK4CPTH3HLD2idEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %535)
          to label %537 unwind label %470

537:                                              ; preds = %533
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #9
  %538 = load i32, ptr %5, align 4, !tbaa !5
  %539 = load i32, ptr %53, align 4, !tbaa !5
  %540 = load i32, ptr %5, align 4, !tbaa !5
  %541 = srem i32 %539, %540
  %542 = sub nsw i32 %538, %541
  %543 = load i32, ptr %5, align 4, !tbaa !5
  %544 = srem i32 %542, %543
  store i32 %544, ptr %67, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EE6modifyExRKi(ptr noundef nonnull align 8 dereferenceable(112) %43, i64 noundef %536, ptr noundef nonnull align 4 dereferenceable(4) %67)
          to label %545 unwind label %546

545:                                              ; preds = %537
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #9
  store i32 23, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #9
  br label %667

546:                                              ; preds = %537
  %547 = landingpad { ptr, i32 }
          cleanup
  %548 = extractvalue { ptr, i32 } %547, 0
  store ptr %548, ptr %8, align 8
  %549 = extractvalue { ptr, i32 } %547, 1
  store i32 %549, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #9
  br label %550

550:                                              ; preds = %546, %532, %495, %470
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #9
  br label %551

551:                                              ; preds = %550, %466
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #9
  br label %668

552:                                              ; preds = %430
  call void @llvm.lifetime.start.p0(i64 4, ptr %68) #9
  %553 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %68)
          to label %554 unwind label %569

554:                                              ; preds = %552
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #9
  store i32 0, ptr %69, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %71) #9
  %555 = load i32, ptr %51, align 4, !tbaa !5
  %556 = sext i32 %555 to i64
  %557 = load i32, ptr %68, align 4, !tbaa !5
  %558 = sext i32 %557 to i64
  invoke void @_ZNK4CPTH3HLD4pathEmm(ptr dead_on_unwind writable sret(%"class.std::vector.6") align 8 %71, ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %556, i64 noundef %558)
          to label %559 unwind label %573

559:                                              ; preds = %554
  store ptr %71, ptr %70, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #9
  %560 = load ptr, ptr %70, align 8, !tbaa !9
  %561 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %560) #9
  %562 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %72, i32 0, i32 0
  store ptr %561, ptr %562, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #9
  %563 = load ptr, ptr %70, align 8, !tbaa !9
  %564 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %563) #9
  %565 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %73, i32 0, i32 0
  store ptr %564, ptr %565, align 8
  br label %566

566:                                              ; preds = %590, %559
  %567 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %73) #9
  br i1 %567, label %577, label %568

568:                                              ; preds = %566
  store i32 28, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #9
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %71) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %71) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #9
  br label %597

569:                                              ; preds = %552
  %570 = landingpad { ptr, i32 }
          cleanup
  %571 = extractvalue { ptr, i32 } %570, 0
  store ptr %571, ptr %8, align 8
  %572 = extractvalue { ptr, i32 } %570, 1
  store i32 %572, ptr %9, align 4
  br label %608

573:                                              ; preds = %554
  %574 = landingpad { ptr, i32 }
          cleanup
  %575 = extractvalue { ptr, i32 } %574, 0
  store ptr %575, ptr %8, align 8
  %576 = extractvalue { ptr, i32 } %574, 1
  store i32 %576, ptr %9, align 4
  br label %596

577:                                              ; preds = %566
  call void @llvm.lifetime.start.p0(i64 16, ptr %74) #9
  %578 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %72) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %74, ptr align 8 %578, i64 16, i1 false)
  %579 = load i32, ptr %69, align 4, !tbaa !5
  %580 = getelementptr inbounds %"struct.std::pair", ptr %74, i32 0, i32 0
  %581 = load i64, ptr %580, align 8, !tbaa !18
  %582 = getelementptr inbounds %"struct.std::pair", ptr %74, i32 0, i32 1
  %583 = load i64, ptr %582, align 8, !tbaa !16
  %584 = add i64 %583, 1
  %585 = invoke noundef i32 @_ZN4CPTH11SegmentTreeIiiLb0EE5queryExx(ptr noundef nonnull align 8 dereferenceable(112) %43, i64 noundef %581, i64 noundef %584)
          to label %586 unwind label %592

586:                                              ; preds = %577
  %587 = add nsw i32 %579, %585
  %588 = load i32, ptr %5, align 4, !tbaa !5
  %589 = srem i32 %587, %588
  store i32 %589, ptr %69, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #9
  br label %590

590:                                              ; preds = %586
  %591 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %72) #9
  br label %566

592:                                              ; preds = %577
  %593 = landingpad { ptr, i32 }
          cleanup
  %594 = extractvalue { ptr, i32 } %593, 0
  store ptr %594, ptr %8, align 8
  %595 = extractvalue { ptr, i32 } %593, 1
  store i32 %595, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #9
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %71) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %71) #9
  br label %596

596:                                              ; preds = %592, %573
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #9
  br label %607

597:                                              ; preds = %568
  %598 = load i32, ptr %69, align 4, !tbaa !5
  %599 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %598)
          to label %600 unwind label %603

600:                                              ; preds = %597
  %601 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %599, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %602 unwind label %603

602:                                              ; preds = %600
  store i32 23, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #9
  br label %667

603:                                              ; preds = %600, %597
  %604 = landingpad { ptr, i32 }
          cleanup
  %605 = extractvalue { ptr, i32 } %604, 0
  store ptr %605, ptr %8, align 8
  %606 = extractvalue { ptr, i32 } %604, 1
  store i32 %606, ptr %9, align 4
  br label %607

607:                                              ; preds = %603, %596
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #9
  br label %608

608:                                              ; preds = %607, %569
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #9
  br label %668

609:                                              ; preds = %430
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #9
  %610 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %75)
          to label %611 unwind label %629

611:                                              ; preds = %609
  call void @llvm.lifetime.start.p0(i64 16, ptr %76) #9
  %612 = load i32, ptr %51, align 4, !tbaa !5
  %613 = sext i32 %612 to i64
  %614 = invoke { i64, i64 } @_ZNK4CPTH3HLD7subtreeEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %613)
          to label %615 unwind label %633

615:                                              ; preds = %611
  %616 = getelementptr inbounds { i64, i64 }, ptr %76, i32 0, i32 0
  %617 = extractvalue { i64, i64 } %614, 0
  store i64 %617, ptr %616, align 8
  %618 = getelementptr inbounds { i64, i64 }, ptr %76, i32 0, i32 1
  %619 = extractvalue { i64, i64 } %614, 1
  store i64 %619, ptr %618, align 8
  %620 = getelementptr inbounds %"struct.std::pair", ptr %76, i32 0, i32 0
  %621 = load i64, ptr %620, align 8, !tbaa !18
  %622 = getelementptr inbounds %"struct.std::pair", ptr %76, i32 0, i32 1
  %623 = load i64, ptr %622, align 8, !tbaa !16
  %624 = add i64 %623, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %77) #9
  %625 = load i32, ptr %75, align 4, !tbaa !5
  %626 = load i32, ptr %5, align 4, !tbaa !5
  %627 = srem i32 %625, %626
  store i32 %627, ptr %77, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EE6modifyExxRKi(ptr noundef nonnull align 8 dereferenceable(112) %43, i64 noundef %621, i64 noundef %624, ptr noundef nonnull align 4 dereferenceable(4) %77)
          to label %628 unwind label %637

628:                                              ; preds = %615
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #9
  store i32 23, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %76) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #9
  br label %667

629:                                              ; preds = %609
  %630 = landingpad { ptr, i32 }
          cleanup
  %631 = extractvalue { ptr, i32 } %630, 0
  store ptr %631, ptr %8, align 8
  %632 = extractvalue { ptr, i32 } %630, 1
  store i32 %632, ptr %9, align 4
  br label %642

633:                                              ; preds = %611
  %634 = landingpad { ptr, i32 }
          cleanup
  %635 = extractvalue { ptr, i32 } %634, 0
  store ptr %635, ptr %8, align 8
  %636 = extractvalue { ptr, i32 } %634, 1
  store i32 %636, ptr %9, align 4
  br label %641

637:                                              ; preds = %615
  %638 = landingpad { ptr, i32 }
          cleanup
  %639 = extractvalue { ptr, i32 } %638, 0
  store ptr %639, ptr %8, align 8
  %640 = extractvalue { ptr, i32 } %638, 1
  store i32 %640, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #9
  br label %641

641:                                              ; preds = %637, %633
  call void @llvm.lifetime.end.p0(i64 16, ptr %76) #9
  br label %642

642:                                              ; preds = %641, %629
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #9
  br label %668

643:                                              ; preds = %430
  call void @llvm.lifetime.start.p0(i64 16, ptr %78) #9
  %644 = load i32, ptr %51, align 4, !tbaa !5
  %645 = sext i32 %644 to i64
  %646 = invoke { i64, i64 } @_ZNK4CPTH3HLD7subtreeEm(ptr noundef nonnull align 8 dereferenceable(264) %14, i64 noundef %645)
          to label %647 unwind label %663

647:                                              ; preds = %643
  %648 = getelementptr inbounds { i64, i64 }, ptr %78, i32 0, i32 0
  %649 = extractvalue { i64, i64 } %646, 0
  store i64 %649, ptr %648, align 8
  %650 = getelementptr inbounds { i64, i64 }, ptr %78, i32 0, i32 1
  %651 = extractvalue { i64, i64 } %646, 1
  store i64 %651, ptr %650, align 8
  %652 = getelementptr inbounds %"struct.std::pair", ptr %78, i32 0, i32 0
  %653 = load i64, ptr %652, align 8, !tbaa !18
  %654 = getelementptr inbounds %"struct.std::pair", ptr %78, i32 0, i32 1
  %655 = load i64, ptr %654, align 8, !tbaa !16
  %656 = add i64 %655, 1
  %657 = invoke noundef i32 @_ZN4CPTH11SegmentTreeIiiLb0EE5queryExx(ptr noundef nonnull align 8 dereferenceable(112) %43, i64 noundef %653, i64 noundef %656)
          to label %658 unwind label %663

658:                                              ; preds = %647
  %659 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %657)
          to label %660 unwind label %663

660:                                              ; preds = %658
  %661 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %659, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %662 unwind label %663

662:                                              ; preds = %660
  store i32 23, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %78) #9
  br label %667

663:                                              ; preds = %660, %658, %647, %643
  %664 = landingpad { ptr, i32 }
          cleanup
  %665 = extractvalue { ptr, i32 } %664, 0
  store ptr %665, ptr %8, align 8
  %666 = extractvalue { ptr, i32 } %664, 1
  store i32 %666, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %78) #9
  br label %668

667:                                              ; preds = %662, %628, %602, %545, %430
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %422, !llvm.loop !22

668:                                              ; preds = %663, %642, %608, %551, %436
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  call void @_ZN4CPTH11SegmentTreeIiiLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %43) #9
  br label %671

669:                                              ; preds = %422
  store i32 0, ptr %1, align 4
  store i32 1, ptr %29, align 4
  call void @_ZN4CPTH11SegmentTreeIiiLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %43) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr %43) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #9
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #9
  call void @_ZN4CPTH3HLDD2Ev(ptr noundef nonnull align 8 dereferenceable(264) %14) #9
  call void @llvm.lifetime.end.p0(i64 264, ptr %14) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %670 = load i32, ptr %1, align 4
  ret i32 %670

671:                                              ; preds = %668, %432
  call void @llvm.lifetime.end.p0(i64 112, ptr %43) #9
  br label %672

672:                                              ; preds = %671, %414
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #9
  br label %673

673:                                              ; preds = %672, %395
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #9
  br label %674

674:                                              ; preds = %673, %381
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  br label %675

675:                                              ; preds = %674, %377
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  br label %676

676:                                              ; preds = %675, %361, %348, %242, %234, %172
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  br label %677

677:                                              ; preds = %676, %131
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #9
  call void @_ZN4CPTH3HLDD2Ev(ptr noundef nonnull align 8 dereferenceable(264) %14) #9
  br label %678

678:                                              ; preds = %677, %127
  call void @llvm.lifetime.end.p0(i64 264, ptr %14) #9
  br label %679

679:                                              ; preds = %678, %110
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  br label %680

680:                                              ; preds = %679, %95
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %681

681:                                              ; preds = %680
  %682 = load ptr, ptr %8, align 8
  %683 = load i32, ptr %9, align 4
  %684 = insertvalue { ptr, i32 } poison, ptr %682, 0
  %685 = insertvalue { ptr, i32 } %684, i32 %683, 1
  resume { ptr, i32 } %685
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_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 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFviEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFiRKiS1_EEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRN4CPTH15SegmentTreeNodeIiiEERKiEEC2IZ4mainE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(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(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #6

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

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

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

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

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

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

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

declare void @_ZN4CPTH3HLDC1Em(ptr, i64)

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.13" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.16" = type { ptr }
%"class.CPTH::HLD" = type { i8, i64, i64, %"class.std::vector", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr, ptr }
%"class.CPTH::SegmentTree" = type { %"class.std::function.17", %"class.std::function.19", %"class.std::vector.22", i64, i64, i32, i32 }
%"class.std::function.17" = type { %"class.std::_Function_base", ptr }
%"class.std::function.19" = type { %"class.std::_Function_base", ptr }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<CPTH::SegmentTreeNode<int, int>, std::allocator<CPTH::SegmentTreeNode<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<CPTH::SegmentTreeNode<int, int>, std::allocator<CPTH::SegmentTreeNode<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<CPTH::SegmentTreeNode<int, int>, std::allocator<CPTH::SegmentTreeNode<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CPTH::SegmentTreeNode<int, int>, std::allocator<CPTH::SegmentTreeNode<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon.27 = type { ptr }
%class.anon.28 = type { ptr }
%"class.__gnu_cxx::__normal_iterator.29" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [62 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.11", align 8
  %6 = alloca %"class.std::allocator.13", align 1
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.16", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.16", align 8
  %9 = alloca %"class.CPTH::HLD", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"class.std::vector.0", align 8
  %17 = alloca %"class.std::vector.0", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::function", align 8
  %22 = alloca %class.anon, align 8
  %23 = alloca %"class.std::vector.11", align 8
  %24 = alloca %"class.std::allocator.13", align 1
  %25 = alloca %"class.CPTH::SegmentTree", align 8
  %26 = alloca %"class.std::function.17", align 8
  %27 = alloca %class.anon.27, align 8
  %28 = alloca %"class.std::function.19", align 8
  %29 = alloca %class.anon.28, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.std::vector.6", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %39 = alloca i32, align 4
  %40 = alloca %"class.std::vector.6", align 8
  %41 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %42 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca %"class.std::vector.6", align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %56, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %57 unwind label %63

57:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %58 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  store ptr %58, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %59 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  store ptr %59, ptr %8, align 8
  %60 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %60, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %67, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 264, ptr nonnull %9) #8
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  invoke void @_ZN4CPTH3HLDC1Em(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %62)
          to label %75 unwind label %83

63:                                               ; preds = %0
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  br label %391

.lr.ph:                                           ; preds = %57, %67
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %66 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %65)
          to label %67 unwind label %73

67:                                               ; preds = %.lr.ph
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = load i32, ptr %65, align 4, !tbaa !5
  %70 = srem i32 %69, %68
  store i32 %70, ptr %65, align 4, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %72 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %72, label %.lr.ph, label %._crit_edge

73:                                               ; preds = %.lr.ph
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %390

75:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #8
  call void @_ZNSaISt6vectorImSaImEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  invoke void @_ZNSt6vectorIS_ImSaImEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %78, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %79 unwind label %85

79:                                               ; preds = %75
  call void @_ZNSt15__new_allocatorISt6vectorImSaImEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  %80 = load i32, ptr %1, align 4, !tbaa !5
  %81 = icmp sgt i32 %80, 1
  br i1 %81, label %.lr.ph132, label %.preheader128

.preheader128:                                    ; preds = %107, %79
  %82 = phi i32 [ %80, %79 ], [ %109, %107 ]
  %.not133 = icmp slt i32 %82, 1
  br i1 %.not133, label %._crit_edge136, label %.lr.ph135

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

85:                                               ; preds = %75
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorImSaImEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  br label %388

.lr.ph132:                                        ; preds = %79, %107
  %.083130 = phi i32 [ %108, %107 ], [ 1, %79 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %87 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %88 unwind label %111

88:                                               ; preds = %.lr.ph132
  %89 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %90 unwind label %111

90:                                               ; preds = %88
  %91 = load i32, ptr %12, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = load i32, ptr %13, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  invoke void @_ZN4CPTH3HLD7addEdgeEmm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %92, i64 noundef %94)
          to label %95 unwind label %111

95:                                               ; preds = %90
  %96 = load i32, ptr %12, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %97) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  store i64 %100, ptr %14, align 8, !tbaa !9
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %101 unwind label %113

101:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  %102 = load i32, ptr %13, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %103) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %105 = load i32, ptr %12, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  store i64 %106, ptr %15, align 8, !tbaa !9
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %107 unwind label %115

107:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  %108 = add nuw nsw i32 %.083130, 1
  %109 = load i32, ptr %1, align 4, !tbaa !5
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %.lr.ph132, label %.preheader128, !llvm.loop !11

111:                                              ; preds = %90, %88, %.lr.ph132
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %117

113:                                              ; preds = %95
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br label %117

115:                                              ; preds = %101
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %117

117:                                              ; preds = %115, %113, %111
  %.pn119 = phi { ptr, i32 } [ %116, %115 ], [ %114, %113 ], [ %112, %111 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br label %387

._crit_edge136:                                   ; preds = %140, %.preheader128
  invoke void @_ZN4CPTH3HLD5buildEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef 1)
          to label %.preheader127 unwind label %144

.preheader127:                                    ; preds = %._crit_edge136
  %118 = load i32, ptr %1, align 4, !tbaa !5
  %.not89140 = icmp slt i32 %118, 1
  br i1 %.not89140, label %.preheader.preheader, label %.lr.ph142

.preheader.preheader:                             ; preds = %._crit_edge139, %.preheader127
  br label %.preheader

.lr.ph135:                                        ; preds = %.preheader128, %140
  %indvars.iv = phi i64 [ %indvars.iv.next, %140 ], [ 1, %.preheader128 ]
  %119 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #8
  %120 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #8
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #8
  %122 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %121) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEEEvT_S7_(ptr %120, ptr %122)
          to label %123 unwind label %134

123:                                              ; preds = %.lr.ph135
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #8
  %124 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4CPTH3HLD8adjacentEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %indvars.iv)
          to label %125 unwind label %136

125:                                              ; preds = %123
  invoke void @_ZNSt6vectorImSaImEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %124)
          to label %126 unwind label %136

126:                                              ; preds = %125
  %127 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  %128 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEEEvT_S7_(ptr %127, ptr %128)
          to label %129 unwind label %138

129:                                              ; preds = %126
  %130 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #8
  %131 = invoke noundef zeroext i1 @_ZSteqImSaImEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %130, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %132 unwind label %138

132:                                              ; preds = %129
  br i1 %131, label %140, label %133

133:                                              ; preds = %132
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, i32 noundef 40, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

134:                                              ; preds = %.lr.ph135
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %387

136:                                              ; preds = %125, %123
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %143

138:                                              ; preds = %129, %126
  %139 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  br label %143

140:                                              ; preds = %132
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %141 = load i32, ptr %1, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %.not.not = icmp slt i64 %indvars.iv, %142
  br i1 %.not.not, label %.lr.ph135, label %._crit_edge136, !llvm.loop !13

143:                                              ; preds = %138, %136
  %.pn116 = phi { ptr, i32 } [ %139, %138 ], [ %137, %136 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #8
  br label %387

144:                                              ; preds = %._crit_edge136
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %387

.lr.ph142:                                        ; preds = %.preheader127, %._crit_edge139
  %indvars.iv164 = phi i64 [ %indvars.iv.next165, %._crit_edge139 ], [ 1, %.preheader127 ]
  %146 = invoke { i64, i64 } @_ZNK4CPTH3HLD7subtreeEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %indvars.iv164)
          to label %147 unwind label %155

147:                                              ; preds = %.lr.ph142
  %148 = invoke noundef i64 @_ZNK4CPTH3HLD4sizeEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %indvars.iv164)
          to label %149 unwind label %155

149:                                              ; preds = %147
  %150 = extractvalue { i64, i64 } %146, 1
  %151 = extractvalue { i64, i64 } %146, 0
  %reass.sub = sub i64 %150, %151
  %152 = add i64 %reass.sub, 1
  %153 = icmp eq i64 %148, %152
  br i1 %153, label %157, label %154

154:                                              ; preds = %149
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.10, i32 noundef 48, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

155:                                              ; preds = %168, %166, %164, %159, %147, %.lr.ph142
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %387

157:                                              ; preds = %149
  %158 = icmp eq i64 %indvars.iv164, 1
  br i1 %158, label %159, label %164

159:                                              ; preds = %157
  %160 = invoke noundef i64 @_ZNK4CPTH3HLD5depthEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef 1)
          to label %161 unwind label %155

161:                                              ; preds = %159
  %162 = icmp eq i64 %160, 0
  br i1 %162, label %174, label %163

163:                                              ; preds = %161
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.10, i32 noundef 50, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

164:                                              ; preds = %157
  %165 = invoke noundef i64 @_ZNK4CPTH3HLD5depthEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %indvars.iv164)
          to label %166 unwind label %155

166:                                              ; preds = %164
  %167 = invoke noundef i64 @_ZNK4CPTH3HLD6parentEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %indvars.iv164)
          to label %168 unwind label %155

168:                                              ; preds = %166
  %169 = invoke noundef i64 @_ZNK4CPTH3HLD5depthEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %167)
          to label %170 unwind label %155

170:                                              ; preds = %168
  %171 = add i64 %169, 1
  %172 = icmp eq i64 %165, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %170
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.10, i32 noundef 52, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

174:                                              ; preds = %170, %161
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #8
  invoke void @_ZNK4CPTH3HLD8childrenEm(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %17, ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %indvars.iv164)
          to label %175 unwind label %181

175:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %176 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  store ptr %176, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  %177 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  store ptr %177, ptr %19, align 8
  %178 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br i1 %178, label %.lr.ph138, label %._crit_edge139

._crit_edge139:                                   ; preds = %194, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #8
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %179 = load i32, ptr %1, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %.not89.not = icmp slt i64 %indvars.iv164, %180
  br i1 %.not89.not, label %.lr.ph142, label %.preheader.preheader, !llvm.loop !14

181:                                              ; preds = %174
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %387

.lr.ph138:                                        ; preds = %175, %194
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %184 = load i64, ptr %183, align 8, !tbaa !9
  %185 = invoke noundef i64 @_ZNK4CPTH3HLD4sizeEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %184)
          to label %186 unwind label %192

186:                                              ; preds = %.lr.ph138
  %187 = invoke noundef i64 @_ZNK4CPTH3HLD10heavyChildEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %indvars.iv164)
          to label %188 unwind label %192

188:                                              ; preds = %186
  %189 = invoke noundef i64 @_ZNK4CPTH3HLD4sizeEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %187)
          to label %190 unwind label %192

190:                                              ; preds = %188
  %.not115 = icmp ugt i64 %185, %189
  br i1 %.not115, label %191, label %194

191:                                              ; preds = %190
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.10, i32 noundef 54, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

192:                                              ; preds = %188, %186, %.lr.ph138
  %193 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #8
  br label %387

194:                                              ; preds = %190
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %196 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br i1 %196, label %.lr.ph138, label %._crit_edge139

197:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #8
  store ptr %9, ptr %22, align 8, !tbaa !15
  %198 = getelementptr inbounds i8, ptr %22, i64 8
  store ptr %20, ptr %198, align 8, !tbaa !15
  %199 = getelementptr inbounds i8, ptr %22, i64 16
  store ptr %21, ptr %199, align 8, !tbaa !15
  invoke void @"_ZNSt8functionIFviEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %206 unwind label %213

.preheader:                                       ; preds = %.preheader.preheader, %202
  %.087143 = phi i32 [ %203, %202 ], [ 1, %.preheader.preheader ]
  %200 = load i32, ptr %3, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  invoke void @_ZN4CPTH3HLD5buildEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %201)
          to label %202 unwind label %204

202:                                              ; preds = %.preheader
  %203 = add nuw nsw i32 %.087143, 1
  %exitcond.not = icmp eq i32 %203, 10000001
  br i1 %exitcond.not, label %197, label %.preheader, !llvm.loop !17

204:                                              ; preds = %.preheader
  %205 = landingpad { ptr, i32 }
          cleanup
  br label %387

206:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  %207 = load i32, ptr %3, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %21, i32 noundef %207)
          to label %208 unwind label %215

208:                                              ; preds = %206
  %209 = load i32, ptr %20, align 4, !tbaa !5
  %210 = load i32, ptr %1, align 4, !tbaa !5
  %211 = icmp eq i32 %209, %210
  br i1 %211, label %217, label %212

212:                                              ; preds = %208
  call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.10, i32 noundef 78, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

213:                                              ; preds = %197
  %214 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  br label %386

215:                                              ; preds = %206
  %216 = landingpad { ptr, i32 }
          cleanup
  br label %385

217:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #8
  %218 = sext i32 %209 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %24) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %218, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %219 unwind label %221

219:                                              ; preds = %217
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #8
  %220 = load i32, ptr %1, align 4, !tbaa !5
  %.not90144 = icmp slt i32 %220, 1
  br i1 %.not90144, label %._crit_edge148, label %.lr.ph147

._crit_edge148:                                   ; preds = %224, %219
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #8
  store ptr %4, ptr %27, align 8, !tbaa !15
  call void @"_ZNSt8functionIFiRKiS1_EEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #8
  store ptr %4, ptr %29, align 8, !tbaa !15
  call void @"_ZNSt8functionIFvRN4CPTH15SegmentTreeNodeIiiEERKiEEC2IZ4mainE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #8
  store i32 0, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #8
  store i32 0, ptr %31, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EEC2ERKSt6vectorIiSaIiEESt8functionIFiRKiS9_EES7_IFvRNS_15SegmentTreeNodeIiiEES9_EExS9_S9_(ptr noundef nonnull align 8 dereferenceable(112) %25, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull %26, ptr noundef nonnull %28, i64 noundef 1, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %234 unwind label %242

221:                                              ; preds = %217
  %222 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #8
  br label %384

.lr.ph147:                                        ; preds = %219, %224
  %indvars.iv167 = phi i64 [ %indvars.iv.next168, %224 ], [ 1, %219 ]
  %223 = invoke noundef i64 @_ZNK4CPTH3HLD4atIdEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %indvars.iv167)
          to label %224 unwind label %232

224:                                              ; preds = %.lr.ph147
  %225 = add i64 %223, -1
  %226 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %225) #8
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = add nsw i64 %indvars.iv167, -1
  %229 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %228) #8
  store i32 %227, ptr %229, align 4, !tbaa !5
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %230 = load i32, ptr %1, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %.not90.not = icmp slt i64 %indvars.iv167, %231
  br i1 %.not90.not, label %.lr.ph147, label %._crit_edge148, !llvm.loop !18

232:                                              ; preds = %.lr.ph147
  %233 = landingpad { ptr, i32 }
          cleanup
  br label %383

234:                                              ; preds = %._crit_edge148
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  %235 = load i32, ptr %2, align 4, !tbaa !5
  %236 = add nsw i32 %235, -1
  store i32 %236, ptr %2, align 4, !tbaa !5
  %.not91159 = icmp eq i32 %235, 0
  br i1 %.not91159, label %._crit_edge162, label %.lr.ph161

.lr.ph161:                                        ; preds = %234, %378
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %33) #8
  %237 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %238 unwind label %244

238:                                              ; preds = %.lr.ph161
  %239 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %237, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %240 unwind label %244

240:                                              ; preds = %238
  %241 = load i32, ptr %32, align 4, !tbaa !5
  switch i32 %241, label %378 [
    i32 1, label %246
    i32 2, label %309
    i32 3, label %342
    i32 4, label %363
  ]

242:                                              ; preds = %._crit_edge148
  %243 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  br label %382

244:                                              ; preds = %238, %.lr.ph161
  %245 = landingpad { ptr, i32 }
          cleanup
  br label %381

246:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %34) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #8
  %247 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %248 unwind label %266

248:                                              ; preds = %246
  %249 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %247, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %250 unwind label %266

250:                                              ; preds = %248
  %251 = load i32, ptr %33, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = load i32, ptr %34, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = invoke noundef i64 @_ZNK4CPTH3HLD3lcaEmm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %252, i64 noundef %254)
          to label %256 unwind label %268

256:                                              ; preds = %250
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %36) #8
  %257 = load i32, ptr %33, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %sext = shl i64 %255, 32
  %259 = ashr exact i64 %sext, 32
  invoke void @_ZNK4CPTH3HLD4pathEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.6") align 8 %36, ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %258, i64 noundef %259)
          to label %260 unwind label %270

260:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %37) #8
  %261 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  store ptr %261, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %38) #8
  %262 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  store ptr %262, ptr %38, align 8
  %263 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  br i1 %263, label %.lr.ph154, label %._crit_edge155

._crit_edge155:                                   ; preds = %277, %260
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #8
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %36) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %40) #8
  %264 = load i32, ptr %34, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  invoke void @_ZNK4CPTH3HLD4pathEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.6") align 8 %40, ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %265, i64 noundef %259)
          to label %282 unwind label %287

266:                                              ; preds = %248, %246
  %267 = landingpad { ptr, i32 }
          cleanup
  br label %308

268:                                              ; preds = %._crit_edge158, %250
  %269 = landingpad { ptr, i32 }
          cleanup
  br label %308

270:                                              ; preds = %256
  %271 = landingpad { ptr, i32 }
          cleanup
  br label %308

.lr.ph154:                                        ; preds = %260, %277
  %272 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  %.sroa.011.0.copyload = load i64, ptr %272, align 8
  %.sroa.512.0..sroa_idx = getelementptr inbounds i8, ptr %272, i64 8
  %.sroa.512.0.copyload = load i64, ptr %.sroa.512.0..sroa_idx, align 8
  %273 = add i64 %.sroa.512.0.copyload, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %39) #8
  %274 = load i32, ptr %35, align 4, !tbaa !5
  %275 = load i32, ptr %4, align 4, !tbaa !5
  %276 = srem i32 %274, %275
  store i32 %276, ptr %39, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EE6modifyExxRKi(ptr noundef nonnull align 8 dereferenceable(112) %25, i64 noundef %.sroa.011.0.copyload, i64 noundef %273, ptr noundef nonnull align 4 dereferenceable(4) %39)
          to label %277 unwind label %280

277:                                              ; preds = %.lr.ph154
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %39) #8
  %278 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  %279 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  br i1 %279, label %.lr.ph154, label %._crit_edge155

280:                                              ; preds = %.lr.ph154
  %281 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #8
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %36) #8
  br label %308

282:                                              ; preds = %._crit_edge155
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %41) #8
  %283 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  store ptr %283, ptr %41, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %42) #8
  %284 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  store ptr %284, ptr %42, align 8
  %285 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  br i1 %285, label %.lr.ph157, label %._crit_edge158

._crit_edge158:                                   ; preds = %294, %282
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %41) #8
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %40) #8
  %286 = invoke noundef i64 @_ZNK4CPTH3HLD2idEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %259)
          to label %299 unwind label %268

287:                                              ; preds = %._crit_edge155
  %288 = landingpad { ptr, i32 }
          cleanup
  br label %308

.lr.ph157:                                        ; preds = %282, %294
  %289 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #8
  %.sroa.07.0.copyload = load i64, ptr %289, align 8
  %.sroa.58.0..sroa_idx = getelementptr inbounds i8, ptr %289, i64 8
  %.sroa.58.0.copyload = load i64, ptr %.sroa.58.0..sroa_idx, align 8
  %290 = add i64 %.sroa.58.0.copyload, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %43) #8
  %291 = load i32, ptr %35, align 4, !tbaa !5
  %292 = load i32, ptr %4, align 4, !tbaa !5
  %293 = srem i32 %291, %292
  store i32 %293, ptr %43, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EE6modifyExxRKi(ptr noundef nonnull align 8 dereferenceable(112) %25, i64 noundef %.sroa.07.0.copyload, i64 noundef %290, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %294 unwind label %297

294:                                              ; preds = %.lr.ph157
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %43) #8
  %295 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #8
  %296 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  br i1 %296, label %.lr.ph157, label %._crit_edge158

297:                                              ; preds = %.lr.ph157
  %298 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %41) #8
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %40) #8
  br label %308

299:                                              ; preds = %._crit_edge158
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %44) #8
  %300 = load i32, ptr %4, align 4, !tbaa !5
  %301 = load i32, ptr %35, align 4, !tbaa !5
  %302 = srem i32 %301, %300
  %303 = sub nsw i32 %300, %302
  %304 = srem i32 %303, %300
  store i32 %304, ptr %44, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EE6modifyExRKi(ptr noundef nonnull align 8 dereferenceable(112) %25, i64 noundef %286, ptr noundef nonnull align 4 dereferenceable(4) %44)
          to label %305 unwind label %306

305:                                              ; preds = %299
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #8
  br label %378

306:                                              ; preds = %299
  %307 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %44) #8
  br label %308

308:                                              ; preds = %268, %306, %280, %270, %297, %287, %266
  %.pn100.pn.pn = phi { ptr, i32 } [ %267, %266 ], [ %307, %306 ], [ %269, %268 ], [ %281, %280 ], [ %271, %270 ], [ %298, %297 ], [ %288, %287 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #8
  br label %381

309:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %45) #8
  %310 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %45)
          to label %311 unwind label %321

311:                                              ; preds = %309
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %46) #8
  %312 = load i32, ptr %33, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = load i32, ptr %45, align 4, !tbaa !5
  %315 = sext i32 %314 to i64
  invoke void @_ZNK4CPTH3HLD4pathEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.6") align 8 %46, ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %313, i64 noundef %315)
          to label %316 unwind label %323

316:                                              ; preds = %311
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %47) #8
  %317 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  store ptr %317, ptr %47, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %48) #8
  %318 = call ptr @_ZNSt6vectorISt4pairImmESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  store ptr %318, ptr %48, align 8
  %319 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %48) #8
  br i1 %319, label %.lr.ph151, label %._crit_edge152

._crit_edge152:                                   ; preds = %328, %316
  %.086.lcssa = phi i32 [ 0, %316 ], [ %331, %328 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %47) #8
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %46) #8
  %320 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.086.lcssa)
          to label %336 unwind label %339

321:                                              ; preds = %309
  %322 = landingpad { ptr, i32 }
          cleanup
  br label %341

323:                                              ; preds = %311
  %324 = landingpad { ptr, i32 }
          cleanup
  br label %341

.lr.ph151:                                        ; preds = %316, %328
  %.086149 = phi i32 [ %331, %328 ], [ 0, %316 ]
  %325 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  %.sroa.03.0.copyload = load i64, ptr %325, align 8
  %.sroa.54.0..sroa_idx = getelementptr inbounds i8, ptr %325, i64 8
  %.sroa.54.0.copyload = load i64, ptr %.sroa.54.0..sroa_idx, align 8
  %326 = add i64 %.sroa.54.0.copyload, 1
  %327 = invoke noundef i32 @_ZN4CPTH11SegmentTreeIiiLb0EE5queryExx(ptr noundef nonnull align 8 dereferenceable(112) %25, i64 noundef %.sroa.03.0.copyload, i64 noundef %326)
          to label %328 unwind label %334

328:                                              ; preds = %.lr.ph151
  %329 = add nsw i32 %327, %.086149
  %330 = load i32, ptr %4, align 4, !tbaa !5
  %331 = srem i32 %329, %330
  %332 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairImmESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  %333 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairImmESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %48) #8
  br i1 %333, label %.lr.ph151, label %._crit_edge152

334:                                              ; preds = %.lr.ph151
  %335 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %47) #8
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %46) #8
  br label %341

336:                                              ; preds = %._crit_edge152
  %337 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %320, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %338 unwind label %339

338:                                              ; preds = %336
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %45) #8
  br label %378

339:                                              ; preds = %336, %._crit_edge152
  %340 = landingpad { ptr, i32 }
          cleanup
  br label %341

341:                                              ; preds = %339, %334, %323, %321
  %.pn94.pn.pn = phi { ptr, i32 } [ %322, %321 ], [ %340, %339 ], [ %335, %334 ], [ %324, %323 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %45) #8
  br label %381

342:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %49) #8
  %343 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %344 unwind label %356

344:                                              ; preds = %342
  %345 = load i32, ptr %33, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = invoke { i64, i64 } @_ZNK4CPTH3HLD7subtreeEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %346)
          to label %348 unwind label %358

348:                                              ; preds = %344
  %349 = extractvalue { i64, i64 } %347, 0
  %350 = extractvalue { i64, i64 } %347, 1
  %351 = add i64 %350, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %50) #8
  %352 = load i32, ptr %49, align 4, !tbaa !5
  %353 = load i32, ptr %4, align 4, !tbaa !5
  %354 = srem i32 %352, %353
  store i32 %354, ptr %50, align 4, !tbaa !5
  invoke void @_ZN4CPTH11SegmentTreeIiiLb0EE6modifyExxRKi(ptr noundef nonnull align 8 dereferenceable(112) %25, i64 noundef %349, i64 noundef %351, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %355 unwind label %360

355:                                              ; preds = %348
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %50) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %49) #8
  br label %378

356:                                              ; preds = %342
  %357 = landingpad { ptr, i32 }
          cleanup
  br label %362

358:                                              ; preds = %344
  %359 = landingpad { ptr, i32 }
          cleanup
  br label %362

360:                                              ; preds = %348
  %361 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %50) #8
  br label %362

362:                                              ; preds = %358, %360, %356
  %.pn.pn = phi { ptr, i32 } [ %357, %356 ], [ %361, %360 ], [ %359, %358 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %49) #8
  br label %381

363:                                              ; preds = %240
  %364 = load i32, ptr %33, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = invoke { i64, i64 } @_ZNK4CPTH3HLD7subtreeEm(ptr noundef nonnull align 8 dereferenceable(264) %9, i64 noundef %365)
          to label %367 unwind label %376

367:                                              ; preds = %363
  %368 = extractvalue { i64, i64 } %366, 0
  %369 = extractvalue { i64, i64 } %366, 1
  %370 = add i64 %369, 1
  %371 = invoke noundef i32 @_ZN4CPTH11SegmentTreeIiiLb0EE5queryExx(ptr noundef nonnull align 8 dereferenceable(112) %25, i64 noundef %368, i64 noundef %370)
          to label %372 unwind label %376

372:                                              ; preds = %367
  %373 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %371)
          to label %374 unwind label %376

374:                                              ; preds = %372
  %375 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %373, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %378 unwind label %376

376:                                              ; preds = %374, %372, %367, %363
  %377 = landingpad { ptr, i32 }
          cleanup
  br label %381

378:                                              ; preds = %374, %355, %338, %305, %240
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #8
  %379 = load i32, ptr %2, align 4, !tbaa !5
  %380 = add nsw i32 %379, -1
  store i32 %380, ptr %2, align 4, !tbaa !5
  %.not91 = icmp eq i32 %379, 0
  br i1 %.not91, label %._crit_edge162, label %.lr.ph161, !llvm.loop !19

381:                                              ; preds = %376, %362, %341, %308, %244
  %.pn104 = phi { ptr, i32 } [ %377, %376 ], [ %.pn.pn, %362 ], [ %.pn94.pn.pn, %341 ], [ %.pn100.pn.pn, %308 ], [ %245, %244 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #8
  call void @_ZN4CPTH11SegmentTreeIiiLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %25) #8
  br label %382

._crit_edge162:                                   ; preds = %378, %234
  call void @_ZN4CPTH11SegmentTreeIiiLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %25) #8
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %25) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @_ZN4CPTH3HLDD2Ev(ptr noundef nonnull align 8 dereferenceable(264) %9) #8
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %9) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

382:                                              ; preds = %381, %242
  %.pn104.pn = phi { ptr, i32 } [ %.pn104, %381 ], [ %243, %242 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %25) #8
  br label %383

383:                                              ; preds = %382, %232
  %.pn107 = phi { ptr, i32 } [ %233, %232 ], [ %.pn104.pn, %382 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  br label %384

384:                                              ; preds = %383, %221
  %.pn107.pn = phi { ptr, i32 } [ %.pn107, %383 ], [ %222, %221 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #8
  br label %385

385:                                              ; preds = %384, %215
  %.pn107.pn.pn = phi { ptr, i32 } [ %.pn107.pn, %384 ], [ %216, %215 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #8
  br label %386

386:                                              ; preds = %385, %213
  %.pn107.pn.pn.pn = phi { ptr, i32 } [ %.pn107.pn.pn, %385 ], [ %214, %213 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  br label %387

387:                                              ; preds = %155, %192, %181, %134, %143, %386, %204, %144, %117
  %.pn119.pn = phi { ptr, i32 } [ %.pn119, %117 ], [ %205, %204 ], [ %.pn107.pn.pn.pn, %386 ], [ %145, %144 ], [ %.pn116, %143 ], [ %135, %134 ], [ %156, %155 ], [ %193, %192 ], [ %182, %181 ]
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  br label %388

388:                                              ; preds = %387, %85
  %.pn119.pn.pn = phi { ptr, i32 } [ %.pn119.pn, %387 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @_ZN4CPTH3HLDD2Ev(ptr noundef nonnull align 8 dereferenceable(264) %9) #8
  br label %389

389:                                              ; preds = %388, %83
  %.pn119.pn.pn.pn = phi { ptr, i32 } [ %.pn119.pn.pn, %388 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %9) #8
  br label %390

390:                                              ; preds = %389, %73
  %.pn124 = phi { ptr, i32 } [ %74, %73 ], [ %.pn119.pn.pn.pn, %389 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  br label %391

391:                                              ; preds = %390, %63
  %.pn124.pn = phi { ptr, i32 } [ %.pn124, %390 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn124.pn
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFviEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFiRKiS1_EEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRN4CPTH15SegmentTreeNodeIiiEERKiEEC2IZ4mainE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #6

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

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

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

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

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

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

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

declare void @_ZN4CPTH3HLDC1Em(ptr, i64) local_unnamed_addr

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


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