; LLVM IR from xirc/cp-algorithm :: aoj/2450 (main)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::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::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.HeavyLightDecomposition = type { i64, %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5" }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator.7" = type { i8 }
%class.SegmentTree = type { %"class.std::function", %struct.Data, %"class.std::function.10", %"class.std::function.13", %struct.Option, i32, i32, %"class.std::vector.16", %"class.std::vector.21" }
%"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 } }
%struct.Data = type { i32, i64, i64, i64, i64 }
%"class.std::function.10" = type { %"class.std::_Function_base", ptr }
%"class.std::function.13" = type { %"class.std::_Function_base", ptr }
%struct.Option = type { i8, i32 }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl" }
%"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl" = type { %"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<Option, std::allocator<Option>>::_Vector_impl" }
%"struct.std::_Vector_base<Option, std::allocator<Option>>::_Vector_impl" = type { %"struct.std::_Vector_base<Option, std::allocator<Option>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Option, std::allocator<Option>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Query = type { %struct.Data }
%struct.Update = type { i8 }
%struct.Lazy = type { %struct.Option }
%"class.std::allocator.18" = type { i8 }
%"class.std::function.26" = type { %"class.std::_Function_base", ptr }
%class.anon = type { ptr, ptr }
%"class.std::function.28" = type { %"class.std::_Function_base", ptr }
%class.anon.30 = type { ptr }
%"class.std::function.31" = type { %"class.std::_Function_base", ptr }
%class.anon.33 = type { i8 }
%class.anon.34 = type { i8 }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.5", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %class.HeavyLightDecomposition, align 8
  %17 = alloca %"class.std::vector.5", align 8
  %18 = alloca %"class.std::initializer_list", align 8
  %19 = alloca [1 x i64], align 8
  %20 = alloca %"class.std::allocator.7", align 1
  %21 = alloca %class.SegmentTree, align 8
  %22 = alloca %struct.Query, align 8
  %23 = alloca %struct.Update, align 1
  %24 = alloca %struct.Lazy, align 4
  %25 = alloca %"class.std::vector.16", align 8
  %26 = alloca %struct.Data, align 8
  %27 = alloca %"class.std::allocator.18", align 1
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %struct.Option, 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::function.26", align 8
  %37 = alloca %class.anon, align 8
  %38 = alloca %struct.Data, align 8
  %39 = alloca %"class.std::function.28", align 8
  %40 = alloca %class.anon.30, align 8
  %41 = alloca %"class.std::function.31", align 8
  %42 = alloca %class.anon.33, align 1
  %43 = alloca %"class.std::function", align 8
  %44 = alloca %class.anon.34, align 1
  store i32 0, ptr %1, align 4
  %45 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %46 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %47 = getelementptr i8, ptr %46, i64 -24
  %48 = load i64, ptr %47, align 8
  %49 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %48
  %50 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %49, ptr noundef null)
  %51 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %52 = getelementptr i8, ptr %51, i64 -24
  %53 = load i64, ptr %52, align 8
  %54 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %53
  %55 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %54, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #8
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %56 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %57 unwind label %71

57:                                               ; preds = %0
  %58 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %59 unwind label %71

59:                                               ; preds = %57
  %60 = load i32, ptr %2, align 4, !tbaa !8
  %61 = sext i32 %60 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #8
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorImSaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  invoke void @_ZNSt6vectorIS_ImSaImEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %61, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %62 unwind label %75

62:                                               ; preds = %59
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  %63 = load i32, ptr %2, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !8
  invoke void @_ZNSt6vectorIiSaIiEE6assignEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %64, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %65 unwind label %79

65:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %66

66:                                               ; preds = %89, %65
  %67 = load i32, ptr %10, align 4, !tbaa !8
  %68 = load i32, ptr %2, align 4, !tbaa !8
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %83, label %70

70:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %96

71:                                               ; preds = %57, %0
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %6, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %7, align 4
  br label %290

75:                                               ; preds = %59
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %6, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %7, align 4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  br label %290

79:                                               ; preds = %62
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %6, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %290

83:                                               ; preds = %66
  %84 = load i32, ptr %10, align 4, !tbaa !8
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %85) #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) %86)
          to label %88 unwind label %92

88:                                               ; preds = %83
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %10, align 4, !tbaa !8
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %10, align 4, !tbaa !8
  br label %66, !llvm.loop !11

92:                                               ; preds = %83
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %6, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %290

96:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %97

97:                                               ; preds = %124, %96
  %98 = load i32, ptr %11, align 4, !tbaa !8
  %99 = load i32, ptr %2, align 4, !tbaa !8
  %100 = sub nsw i32 %99, 1
  %101 = icmp slt i32 %98, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %140

103:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %104 = 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 %105 unwind label %127

105:                                              ; preds = %103
  %106 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %104, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %107 unwind label %127

107:                                              ; preds = %105
  %108 = load i32, ptr %12, align 4, !tbaa !8
  %109 = add nsw i32 %108, -1
  store i32 %109, ptr %12, align 4, !tbaa !8
  %110 = load i32, ptr %13, align 4, !tbaa !8
  %111 = add nsw i32 %110, -1
  store i32 %111, ptr %13, align 4, !tbaa !8
  %112 = load i32, ptr %12, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %113) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %115 = load i32, ptr %13, align 4, !tbaa !8
  %116 = sext i32 %115 to i64
  store i64 %116, ptr %14, align 8, !tbaa !13
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %114, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %117 unwind label %131

117:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  %118 = load i32, ptr %13, align 4, !tbaa !8
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %119) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %121 = load i32, ptr %12, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  store i64 %122, ptr %15, align 8, !tbaa !13
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %120, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %123 unwind label %135

123:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %11, align 4, !tbaa !8
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %11, align 4, !tbaa !8
  br label %97, !llvm.loop !15

127:                                              ; preds = %105, %103
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %6, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %7, align 4
  br label %139

131:                                              ; preds = %107
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %6, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %139

135:                                              ; preds = %117
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %6, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %139

139:                                              ; preds = %135, %131, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %290

140:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 200, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store i64 0, ptr %19, align 8, !tbaa !13
  %141 = getelementptr inbounds %"class.std::initializer_list", ptr %18, i32 0, i32 0
  store ptr %19, ptr %141, align 8, !tbaa !16
  %142 = getelementptr inbounds %"class.std::initializer_list", ptr %18, i32 0, i32 1
  store i64 1, ptr %142, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #8
  call void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  %143 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8
  %145 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %146 = load i64, ptr %145, align 8
  invoke void @_ZNSt6vectorImSaImEEC2ESt16initializer_listImERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr %144, i64 %146, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %147 unwind label %164

147:                                              ; preds = %140
  invoke void @_ZN23HeavyLightDecompositionC2ERKSt6vectorIS0_ImSaImEESaIS2_EERKS2_(ptr noundef nonnull align 8 dereferenceable(200) %16, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %148 unwind label %168

148:                                              ; preds = %147
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 200, ptr %21) #8
  %149 = load i32, ptr %2, align 4, !tbaa !8
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 40, i1 false)
  call void @_ZN5QueryC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #8
  call void @llvm.memset.p0.i64(ptr align 4 %24, i8 0, i64 8, i1 false)
  invoke void @_ZN4LazyC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %24)
          to label %150 unwind label %173

150:                                              ; preds = %148
  %151 = getelementptr inbounds %struct.Lazy, ptr %24, i32 0, i32 0
  %152 = load i64, ptr %151, align 4
  invoke void @_ZN11SegmentTreeI4Data6OptionEC2I5Query6Update4LazyEEiT_T0_T1_(ptr noundef nonnull align 8 dereferenceable(200) %21, i32 noundef %149, ptr noundef byval(%struct.Query) align 8 %22, i64 %152)
          to label %153 unwind label %173

153:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #8
  %154 = load i32, ptr %2, align 4, !tbaa !8
  %155 = sext i32 %154 to i64
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #8
  invoke void @_ZN4Data4makeEi(ptr dead_on_unwind writable sret(%struct.Data) align 8 %26, i32 noundef 0)
          to label %156 unwind label %177

156:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #8
  call void @_ZNSaI4DataEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  invoke void @_ZNSt6vectorI4DataSaIS0_EEC2EmRKS0_RKS1_(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %155, ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %157 unwind label %181

157:                                              ; preds = %156
  invoke void @_ZN11SegmentTreeI4Data6OptionE5buildERKSt6vectorIS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(200) %21, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %158 unwind label %185

158:                                              ; preds = %157
  call void @_ZNSt6vectorI4DataSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  call void @_ZNSt15__new_allocatorI4DataED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !8
  br label %159

159:                                              ; preds = %204, %158
  %160 = load i32, ptr %28, align 4, !tbaa !8
  %161 = load i32, ptr %2, align 4, !tbaa !8
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %191, label %163

163:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %216

164:                                              ; preds = %140
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %6, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %7, align 4
  br label %172

168:                                              ; preds = %147
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %6, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %7, align 4
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  br label %172

172:                                              ; preds = %168, %164
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  br label %289

173:                                              ; preds = %150, %148
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %6, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %7, align 4
  br label %288

177:                                              ; preds = %153
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %6, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %7, align 4
  br label %190

181:                                              ; preds = %156
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %6, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %7, align 4
  br label %189

185:                                              ; preds = %157
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %6, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %7, align 4
  call void @_ZNSt6vectorI4DataSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  br label %189

189:                                              ; preds = %185, %181
  call void @_ZNSt15__new_allocatorI4DataED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  br label %190

190:                                              ; preds = %189, %177
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  br label %287

191:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %192 = load i32, ptr %28, align 4, !tbaa !8
  %193 = sext i32 %192 to i64
  %194 = invoke noundef i64 @_ZNK23HeavyLightDecomposition10get_vertexEm(ptr noundef nonnull align 8 dereferenceable(200) %16, i64 noundef %193)
          to label %195 unwind label %207

195:                                              ; preds = %191
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %194) #8
  %197 = load i32, ptr %196, align 4, !tbaa !8
  store i32 %197, ptr %29, align 4, !tbaa !8
  %198 = load i32, ptr %28, align 4, !tbaa !8
  %199 = load i32, ptr %28, align 4, !tbaa !8
  %200 = add nsw i32 %199, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %201 = load i32, ptr %29, align 4, !tbaa !8
  invoke void @_ZN6OptionC2Ei(ptr noundef nonnull align 4 dereferenceable(8) %30, i32 noundef %201)
          to label %202 unwind label %211

202:                                              ; preds = %195
  invoke void @_ZN11SegmentTreeI4Data6OptionE6updateEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(200) %21, i32 noundef %198, i32 noundef %200, ptr noundef nonnull align 4 dereferenceable(8) %30)
          to label %203 unwind label %211

203:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %28, align 4, !tbaa !8
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %28, align 4, !tbaa !8
  br label %159, !llvm.loop !20

207:                                              ; preds = %191
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %6, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %7, align 4
  br label %215

211:                                              ; preds = %202, %195
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %6, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %215

215:                                              ; preds = %211, %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %287

216:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !8
  br label %217

217:                                              ; preds = %281, %216
  %218 = load i32, ptr %31, align 4, !tbaa !8
  %219 = load i32, ptr %3, align 4, !tbaa !8
  %220 = icmp slt i32 %218, %219
  br i1 %220, label %222, label %221

221:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %285

222:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %223 = 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 %224 unwind label %245

224:                                              ; preds = %222
  %225 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %223, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %226 unwind label %245

226:                                              ; preds = %224
  %227 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %225, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %228 unwind label %245

228:                                              ; preds = %226
  %229 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %227, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %230 unwind label %245

230:                                              ; preds = %228
  %231 = load i32, ptr %33, align 4, !tbaa !8
  %232 = add nsw i32 %231, -1
  store i32 %232, ptr %33, align 4, !tbaa !8
  %233 = load i32, ptr %34, align 4, !tbaa !8
  %234 = add nsw i32 %233, -1
  store i32 %234, ptr %34, align 4, !tbaa !8
  %235 = load i32, ptr %32, align 4, !tbaa !8
  %236 = icmp eq i32 %235, 1
  br i1 %236, label %237, label %253

237:                                              ; preds = %230
  %238 = load i32, ptr %33, align 4, !tbaa !8
  %239 = sext i32 %238 to i64
  %240 = load i32, ptr %34, align 4, !tbaa !8
  %241 = sext i32 %240 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #8
  %242 = getelementptr inbounds %class.anon, ptr %37, i32 0, i32 0
  store ptr %21, ptr %242, align 8, !tbaa !21
  %243 = getelementptr inbounds %class.anon, ptr %37, i32 0, i32 1
  store ptr %35, ptr %243, align 8, !tbaa !21
  call void @"_ZNSt8functionIFvmmbEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(16) %37) #8
  invoke void @_ZNK23HeavyLightDecomposition15for_each_vertexEmmRKSt8functionIFvmmbEE(ptr noundef nonnull align 8 dereferenceable(200) %16, i64 noundef %239, i64 noundef %241, ptr noundef nonnull align 8 dereferenceable(32) %36)
          to label %244 unwind label %249

244:                                              ; preds = %237
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #8
  br label %280

245:                                              ; preds = %278, %228, %226, %224, %222
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %6, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %7, align 4
  br label %284

249:                                              ; preds = %237
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %6, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %7, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #8
  br label %284

253:                                              ; preds = %230
  %254 = load i32, ptr %32, align 4, !tbaa !8
  %255 = icmp eq i32 %254, 2
  br i1 %255, label %256, label %278

256:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 40, ptr %38) #8
  %257 = load i32, ptr %33, align 4, !tbaa !8
  %258 = sext i32 %257 to i64
  %259 = load i32, ptr %34, align 4, !tbaa !8
  %260 = sext i32 %259 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %261 = getelementptr inbounds %class.anon.30, ptr %40, i32 0, i32 0
  store ptr %21, ptr %261, align 8, !tbaa !21
  call void @"_ZNSt8functionIF4DatammbEEC2IZ4mainE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %42) #8
  call void @"_ZNSt8functionIF4DataRKS0_EEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef nonnull align 1 dereferenceable(1) %42) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %43) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %44) #8
  call void @"_ZNSt8functionIF4DataRKS0_S2_EEC2IZ4mainE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef nonnull align 1 dereferenceable(1) %44) #8
  invoke void @_ZNK23HeavyLightDecomposition18reduce_each_vertexI4DataEET_mmRKSt8functionIFS2_mmbEERKS3_IFS2_RKS2_EERKS3_IFS2_S9_S9_EE(ptr dead_on_unwind writable sret(%struct.Data) align 8 %38, ptr noundef nonnull align 8 dereferenceable(200) %16, i64 noundef %258, i64 noundef %260, ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef nonnull align 8 dereferenceable(32) %43)
          to label %262 unwind label %269

262:                                              ; preds = %256
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #8
  %263 = getelementptr inbounds %struct.Data, ptr %38, i32 0, i32 4
  %264 = load i64, ptr %263, align 8, !tbaa !22
  %265 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %264)
          to label %266 unwind label %273

266:                                              ; preds = %262
  %267 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %265, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %268 unwind label %273

268:                                              ; preds = %266
  call void @llvm.lifetime.end.p0(i64 40, ptr %38) #8
  br label %279

269:                                              ; preds = %256
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %6, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %7, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #8
  br label %277

273:                                              ; preds = %266, %262
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %6, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %7, align 4
  br label %277

277:                                              ; preds = %273, %269
  call void @llvm.lifetime.end.p0(i64 40, ptr %38) #8
  br label %284

278:                                              ; preds = %253
  invoke void @__cxa_rethrow() #9
          to label %296 unwind label %245

279:                                              ; preds = %268
  br label %280

280:                                              ; preds = %279, %244
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %281

281:                                              ; preds = %280
  %282 = load i32, ptr %31, align 4, !tbaa !8
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %31, align 4, !tbaa !8
  br label %217, !llvm.loop !25

284:                                              ; preds = %277, %249, %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %287

285:                                              ; preds = %221
  store i32 0, ptr %1, align 4
  call void @_ZN11SegmentTreeI4Data6OptionED2Ev(ptr noundef nonnull align 8 dereferenceable(200) %21) #8
  call void @llvm.lifetime.end.p0(i64 200, ptr %21) #8
  call void @_ZN23HeavyLightDecompositionD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %16) #8
  call void @llvm.lifetime.end.p0(i64 200, ptr %16) #8
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %286 = load i32, ptr %1, align 4
  ret i32 %286

287:                                              ; preds = %284, %215, %190
  call void @_ZN11SegmentTreeI4Data6OptionED2Ev(ptr noundef nonnull align 8 dereferenceable(200) %21) #8
  br label %288

288:                                              ; preds = %287, %173
  call void @llvm.lifetime.end.p0(i64 200, ptr %21) #8
  call void @_ZN23HeavyLightDecompositionD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %16) #8
  br label %289

289:                                              ; preds = %288, %172
  call void @llvm.lifetime.end.p0(i64 200, ptr %16) #8
  br label %290

290:                                              ; preds = %289, %139, %92, %79, %75, %71
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %291

291:                                              ; preds = %290
  %292 = load ptr, ptr %6, align 8
  %293 = load i32, ptr %7, align 4
  %294 = insertvalue { ptr, i32 } poison, ptr %292, 0
  %295 = insertvalue { ptr, i32 } %294, i32 %293, 1
  resume { ptr, i32 } %295

296:                                              ; preds = %278
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #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 void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorImSaImEED2Ev(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.end.p0(i64 immarg, ptr nocapture) #3

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5QueryC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11SegmentTreeI4Data6OptionEC2I5Query6Update4LazyEEiT_T0_T1_(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, ptr noundef byval(%struct.Query) align 8, i64) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Data4makeEi(ptr dead_on_unwind noalias writable sret(%struct.Data) align 8, i32 noundef) #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6OptionC2Ei(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK23HeavyLightDecomposition18reduce_each_vertexI4DataEET_mmRKSt8functionIFS2_mmbEERKS3_IFS2_RKS2_EERKS3_IFS2_S9_S9_EE(ptr dead_on_unwind noalias writable sret(%struct.Data) align 8, ptr noundef nonnull align 8 dereferenceable(200), i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 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

declare void @__cxa_rethrow()

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11SegmentTreeI4Data6OptionED2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN23HeavyLightDecompositionD2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #6 align 2

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

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

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = !{!17, !18, i64 0}
!17 = !{!"_ZTSSt16initializer_listImE", !18, i64 0, !14, i64 8}
!18 = !{!"any pointer", !10, i64 0}
!19 = !{!17, !14, i64 8}
!20 = distinct !{!20, !12}
!21 = !{!18, !18, i64 0}
!22 = !{!23, !24, i64 32}
!23 = !{!"_ZTS4Data", !9, i64 0, !24, i64 8, !24, i64 16, !24, i64 24, !24, i64 32}
!24 = !{!"long long", !10, i64 0}
!25 = distinct !{!25, !12}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::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::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.HeavyLightDecomposition = type { i64, %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.5" }
%"class.std::allocator.7" = type { i8 }
%class.SegmentTree = type { %"class.std::function", %struct.Data, %"class.std::function.10", %"class.std::function.13", %struct.Option, i32, i32, %"class.std::vector.16", %"class.std::vector.21" }
%"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 } }
%struct.Data = type { i32, i64, i64, i64, i64 }
%"class.std::function.10" = type { %"class.std::_Function_base", ptr }
%"class.std::function.13" = type { %"class.std::_Function_base", ptr }
%struct.Option = type { i8, i32 }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl" }
%"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl" = type { %"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Data, std::allocator<Data>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<Option, std::allocator<Option>>::_Vector_impl" }
%"struct.std::_Vector_base<Option, std::allocator<Option>>::_Vector_impl" = type { %"struct.std::_Vector_base<Option, std::allocator<Option>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Option, std::allocator<Option>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Query = type { %struct.Data }
%struct.Lazy = type { %struct.Option }
%"class.std::allocator.18" = type { i8 }
%"class.std::function.26" = type { %"class.std::_Function_base", ptr }
%class.anon = type { ptr, ptr }
%"class.std::function.28" = type { %"class.std::_Function_base", ptr }
%class.anon.30 = type { ptr }
%"class.std::function.31" = type { %"class.std::_Function_base", ptr }
%class.anon.33 = type { i8 }
%class.anon.34 = type { i8 }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca %"class.std::vector.5", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %class.HeavyLightDecomposition, align 8
  %12 = alloca %"class.std::vector.5", align 8
  %13 = alloca [1 x i64], align 8
  %14 = alloca %"class.std::allocator.7", align 1
  %15 = alloca %class.SegmentTree, align 8
  %16 = alloca %struct.Query, align 8
  %17 = alloca %struct.Lazy, align 8
  %18 = alloca %"class.std::vector.16", align 8
  %19 = alloca %struct.Data, align 8
  %20 = alloca %"class.std::allocator.18", align 1
  %21 = alloca %struct.Option, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::function.26", align 8
  %27 = alloca %class.anon, align 8
  %28 = alloca %struct.Data, align 8
  %29 = alloca %"class.std::function.28", align 8
  %30 = alloca %class.anon.30, align 8
  %31 = alloca %"class.std::function.31", align 8
  %32 = alloca %class.anon.33, align 1
  %33 = alloca %"class.std::function", align 8
  %34 = alloca %class.anon.34, align 1
  %35 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %36 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %37 = getelementptr i8, ptr %36, i64 -24
  %38 = load i64, ptr %37, align 8
  %39 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %38
  %40 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %39, ptr noundef null)
  %41 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %42 = getelementptr i8, ptr %41, i64 -24
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %43
  %45 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %44, ptr noundef null)
  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 24, ptr nonnull %3) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %47 unwind label %59

47:                                               ; preds = %0
  %48 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %49 unwind label %59

49:                                               ; preds = %47
  %50 = load i32, ptr %1, align 4, !tbaa !8
  %51 = sext i32 %50 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorImSaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  invoke void @_ZNSt6vectorIS_ImSaImEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %51, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %52 unwind label %61

52:                                               ; preds = %49
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  %53 = load i32, ptr %1, align 4, !tbaa !8
  %54 = sext i32 %53 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !8
  invoke void @_ZNSt6vectorIiSaIiEE6assignEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %54, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %55 unwind label %63

55:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %56 = load i32, ptr %1, align 4, !tbaa !8
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %.lr.ph, label %._crit_edge

.preheader46:                                     ; preds = %67
  %58 = icmp sgt i32 %68, 1
  br i1 %58, label %.lr.ph49, label %._crit_edge

59:                                               ; preds = %47, %0
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %187

61:                                               ; preds = %49
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %187

63:                                               ; preds = %52
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %187

.lr.ph:                                           ; preds = %55, %67
  %indvars.iv = phi i64 [ %indvars.iv.next, %67 ], [ 0, %55 ]
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #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 %71

67:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %68 = load i32, ptr %1, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next, %69
  br i1 %70, label %.lr.ph, label %.preheader46, !llvm.loop !11

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

._crit_edge:                                      ; preds = %91, %55, %.preheader46
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  store i64 0, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #8
  call void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  invoke void @_ZNSt6vectorImSaImEEC2ESt16initializer_listImERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr nonnull %13, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %103 unwind label %119

.lr.ph49:                                         ; preds = %.preheader46, %91
  %.02748 = phi i32 [ %92, %91 ], [ 0, %.preheader46 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %73 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %74 unwind label %96

74:                                               ; preds = %.lr.ph49
  %75 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %76 unwind label %96

76:                                               ; preds = %74
  %77 = load i32, ptr %7, align 4, !tbaa !8
  %78 = add nsw i32 %77, -1
  store i32 %78, ptr %7, align 4, !tbaa !8
  %79 = load i32, ptr %8, align 4, !tbaa !8
  %80 = add nsw i32 %79, -1
  store i32 %80, ptr %8, align 4, !tbaa !8
  %81 = sext i32 %78 to i64
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %81) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %83 = load i32, ptr %8, align 4, !tbaa !8
  %84 = sext i32 %83 to i64
  store i64 %84, ptr %9, align 8, !tbaa !13
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %82, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %85 unwind label %98

85:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %86 = load i32, ptr %8, align 4, !tbaa !8
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %87) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %89 = load i32, ptr %7, align 4, !tbaa !8
  %90 = sext i32 %89 to i64
  store i64 %90, ptr %10, align 8, !tbaa !13
  invoke void @_ZNSt6vectorImSaImEE9push_backEOm(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %91 unwind label %100

91:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %92 = add nuw nsw i32 %.02748, 1
  %93 = load i32, ptr %1, align 4, !tbaa !8
  %94 = add nsw i32 %93, -1
  %95 = icmp slt i32 %92, %94
  br i1 %95, label %.lr.ph49, label %._crit_edge, !llvm.loop !15

96:                                               ; preds = %74, %.lr.ph49
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %102

98:                                               ; preds = %76
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %102

100:                                              ; preds = %85
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %102

102:                                              ; preds = %100, %98, %96
  %.pn42 = phi { ptr, i32 } [ %101, %100 ], [ %99, %98 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %187

103:                                              ; preds = %._crit_edge
  invoke void @_ZN23HeavyLightDecompositionC2ERKSt6vectorIS0_ImSaImEESaIS2_EERKS2_(ptr noundef nonnull align 8 dereferenceable(200) %11, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %104 unwind label %121

104:                                              ; preds = %103
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %15) #8
  %105 = load i32, ptr %1, align 4, !tbaa !8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %16, i8 0, i64 40, i1 false)
  call void @_ZN5QueryC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #8
  store i64 0, ptr %17, align 8
  invoke void @_ZN4LazyC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %106 unwind label %124

106:                                              ; preds = %104
  %107 = load i64, ptr %17, align 8
  invoke void @_ZN11SegmentTreeI4Data6OptionEC2I5Query6Update4LazyEEiT_T0_T1_(ptr noundef nonnull align 8 dereferenceable(200) %15, i32 noundef %105, ptr noundef nonnull byval(%struct.Query) align 8 %16, i64 %107)
          to label %108 unwind label %124

108:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #8
  %109 = load i32, ptr %1, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %19) #8
  call void @_ZN4Data4makeEi(ptr dead_on_unwind nonnull writable sret(%struct.Data) align 8 %19, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #8
  call void @_ZNSaI4DataEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  invoke void @_ZNSt6vectorI4DataSaIS0_EEC2EmRKS0_RKS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %110, ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %111 unwind label %126

111:                                              ; preds = %108
  invoke void @_ZN11SegmentTreeI4Data6OptionE5buildERKSt6vectorIS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(200) %15, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %112 unwind label %128

112:                                              ; preds = %111
  call void @_ZNSt6vectorI4DataSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  call void @_ZNSt15__new_allocatorI4DataED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #8
  %113 = load i32, ptr %1, align 4, !tbaa !8
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %.lr.ph52, label %.preheader

.preheader:                                       ; preds = %136, %112
  %115 = load i32, ptr %2, align 4, !tbaa !8
  %116 = icmp sgt i32 %115, 0
  br i1 %116, label %.lr.ph54, label %._crit_edge55

.lr.ph54:                                         ; preds = %.preheader
  %117 = getelementptr inbounds i8, ptr %28, i64 32
  %118 = getelementptr inbounds i8, ptr %27, i64 8
  br label %144

119:                                              ; preds = %._crit_edge
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %123

121:                                              ; preds = %103
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  br label %123

123:                                              ; preds = %121, %119
  %.pn = phi { ptr, i32 } [ %122, %121 ], [ %120, %119 ]
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  br label %186

124:                                              ; preds = %106, %104
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %185

126:                                              ; preds = %108
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %130

128:                                              ; preds = %111
  %129 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI4DataSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  br label %130

130:                                              ; preds = %128, %126
  %.pn31 = phi { ptr, i32 } [ %129, %128 ], [ %127, %126 ]
  call void @_ZNSt15__new_allocatorI4DataED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #8
  br label %184

.lr.ph52:                                         ; preds = %112, %136
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %136 ], [ 0, %112 ]
  %131 = invoke noundef i64 @_ZNK23HeavyLightDecomposition10get_vertexEm(ptr noundef nonnull align 8 dereferenceable(200) %11, i64 noundef %indvars.iv57)
          to label %132 unwind label %140

132:                                              ; preds = %.lr.ph52
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %131) #8
  %134 = load i32, ptr %133, align 4, !tbaa !8
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %indvars = trunc i64 %indvars.iv.next58 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  call void @_ZN6OptionC2Ei(ptr noundef nonnull align 4 dereferenceable(8) %21, i32 noundef %134)
  %135 = trunc nuw nsw i64 %indvars.iv57 to i32
  invoke void @_ZN11SegmentTreeI4Data6OptionE6updateEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(200) %15, i32 noundef %135, i32 noundef %indvars, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %136 unwind label %142

136:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  %137 = load i32, ptr %1, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = icmp slt i64 %indvars.iv.next58, %138
  br i1 %139, label %.lr.ph52, label %.preheader, !llvm.loop !16

140:                                              ; preds = %.lr.ph52
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %184

142:                                              ; preds = %132
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  br label %184

._crit_edge55:                                    ; preds = %179, %.preheader
  call void @_ZN11SegmentTreeI4Data6OptionED2Ev(ptr noundef nonnull align 8 dereferenceable(200) %15) #8
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %15) #8
  call void @_ZN23HeavyLightDecompositionD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %11) #8
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %11) #8
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, 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

144:                                              ; preds = %.lr.ph54, %179
  %.053 = phi i32 [ 0, %.lr.ph54 ], [ %180, %179 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #8
  %145 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %146 unwind label %.loopexit

146:                                              ; preds = %144
  %147 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %145, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %148 unwind label %.loopexit

148:                                              ; preds = %146
  %149 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %147, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %150 unwind label %.loopexit

150:                                              ; preds = %148
  %151 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %149, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %152 unwind label %.loopexit

152:                                              ; preds = %150
  %153 = load i32, ptr %23, align 4, !tbaa !8
  %154 = add nsw i32 %153, -1
  store i32 %154, ptr %23, align 4, !tbaa !8
  %155 = load i32, ptr %24, align 4, !tbaa !8
  %156 = add nsw i32 %155, -1
  store i32 %156, ptr %24, align 4, !tbaa !8
  %157 = load i32, ptr %22, align 4, !tbaa !8
  switch i32 %157, label %178 [
    i32 1, label %158
    i32 2, label %164
  ]

158:                                              ; preds = %152
  %159 = sext i32 %154 to i64
  %160 = sext i32 %156 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #8
  store ptr %15, ptr %27, align 8, !tbaa !17
  store ptr %25, ptr %118, align 8, !tbaa !17
  call void @"_ZNSt8functionIFvmmbEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  invoke void @_ZNK23HeavyLightDecomposition15for_each_vertexEmmRKSt8functionIFvmmbEE(ptr noundef nonnull align 8 dereferenceable(200) %11, i64 noundef %159, i64 noundef %160, ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %161 unwind label %162

161:                                              ; preds = %158
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #8
  br label %179

.loopexit:                                        ; preds = %144, %146, %148, %150
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %183

.loopexit.split-lp:                               ; preds = %178
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %183

162:                                              ; preds = %158
  %163 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #8
  br label %183

164:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %28) #8
  %165 = sext i32 %154 to i64
  %166 = sext i32 %156 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %29) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #8
  store ptr %15, ptr %30, align 8, !tbaa !17
  call void @"_ZNSt8functionIF4DatammbEEC2IZ4mainE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %31) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %32) #8
  call void @"_ZNSt8functionIF4DataRKS0_EEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 1 dereferenceable(1) %32) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %33) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %34) #8
  call void @"_ZNSt8functionIF4DataRKS0_S2_EEC2IZ4mainE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 1 dereferenceable(1) %34) #8
  invoke void @_ZNK23HeavyLightDecomposition18reduce_each_vertexI4DataEET_mmRKSt8functionIFS2_mmbEERKS3_IFS2_RKS2_EERKS3_IFS2_S9_S9_EE(ptr dead_on_unwind nonnull writable sret(%struct.Data) align 8 %28, ptr noundef nonnull align 8 dereferenceable(200) %11, i64 noundef %165, i64 noundef %166, ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %167 unwind label %173

167:                                              ; preds = %164
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %33) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %31) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %29) #8
  %168 = load i64, ptr %117, align 8, !tbaa !19
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %168)
          to label %170 unwind label %175

170:                                              ; preds = %167
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %169, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %172 unwind label %175

172:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %28) #8
  br label %179

173:                                              ; preds = %164
  %174 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %33) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %31) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %29) #8
  br label %177

175:                                              ; preds = %170, %167
  %176 = landingpad { ptr, i32 }
          cleanup
  br label %177

177:                                              ; preds = %175, %173
  %.pn33 = phi { ptr, i32 } [ %176, %175 ], [ %174, %173 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %28) #8
  br label %183

178:                                              ; preds = %152
  invoke void @__cxa_rethrow() #9
          to label %188 unwind label %.loopexit.split-lp

179:                                              ; preds = %172, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #8
  %180 = add nuw nsw i32 %.053, 1
  %181 = load i32, ptr %2, align 4, !tbaa !8
  %182 = icmp slt i32 %180, %181
  br i1 %182, label %144, label %._crit_edge55, !llvm.loop !22

183:                                              ; preds = %.loopexit, %.loopexit.split-lp, %177, %162
  %.pn35 = phi { ptr, i32 } [ %163, %162 ], [ %.pn33, %177 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #8
  br label %184

184:                                              ; preds = %140, %142, %183, %130
  %.pn37.pn = phi { ptr, i32 } [ %.pn35, %183 ], [ %.pn31, %130 ], [ %143, %142 ], [ %141, %140 ]
  call void @_ZN11SegmentTreeI4Data6OptionED2Ev(ptr noundef nonnull align 8 dereferenceable(200) %15) #8
  br label %185

185:                                              ; preds = %184, %124
  %.pn37.pn.pn = phi { ptr, i32 } [ %.pn37.pn, %184 ], [ %125, %124 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %15) #8
  call void @_ZN23HeavyLightDecompositionD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %11) #8
  br label %186

186:                                              ; preds = %185, %123
  %.pn37.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn, %185 ], [ %.pn, %123 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %11) #8
  br label %187

187:                                              ; preds = %186, %102, %71, %63, %61, %59
  %.pn44 = phi { ptr, i32 } [ %72, %71 ], [ %.pn42, %102 ], [ %.pn37.pn.pn.pn, %186 ], [ %64, %63 ], [ %62, %61 ], [ %60, %59 ]
  call void @_ZNSt6vectorIS_ImSaImEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, 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 } %.pn44

188:                                              ; preds = %178
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_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 void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorImSaImEED2Ev(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.end.p0(i64 immarg, ptr nocapture) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_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 #4 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5QueryC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11SegmentTreeI4Data6OptionEC2I5Query6Update4LazyEEiT_T0_T1_(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, ptr noundef byval(%struct.Query) align 8, i64) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Data4makeEi(ptr dead_on_unwind noalias writable sret(%struct.Data) align 8, i32 noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6OptionC2Ei(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK23HeavyLightDecomposition18reduce_each_vertexI4DataEET_mmRKSt8functionIFS2_mmbEERKS3_IFS2_RKS2_EERKS3_IFS2_S9_S9_EE(ptr dead_on_unwind noalias writable sret(%struct.Data) align 8, ptr noundef nonnull align 8 dereferenceable(200), i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

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

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

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

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

declare void @__cxa_rethrow() local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11SegmentTreeI4Data6OptionED2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN23HeavyLightDecompositionD2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #6 align 2

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

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

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !10, i64 0}
!19 = !{!20, !21, i64 32}
!20 = !{!"_ZTS4Data", !9, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !21, i64 32}
!21 = !{!"long long", !10, i64 0}
!22 = distinct !{!22, !12}


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