; LLVM IR from duc0/ContestNeko :: CPPProjects (SubtreeSize)

; 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.WeightedTree = type { %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector", i32, i32 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_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<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }
%"struct.std::pair" = type { i32, i32 }
%class.HeavyLightDecomposition = type <{ ptr, i32, [4 x i8], %"class.std::vector", %"class.std::vector", %"class.std::vector", i32, [4 x i8] }>
%struct.SegmentTree = type { %"class.std::vector.10", %"class.std::function", %"class.std::function.15", %"class.std::function.17", %"class.std::function.19", i32, i32, i32, i32 }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<SegmentTree<int, int>::TreeNode, std::allocator<SegmentTree<int, int>::TreeNode>>::_Vector_impl" }
%"struct.std::_Vector_base<SegmentTree<int, int>::TreeNode, std::allocator<SegmentTree<int, int>::TreeNode>>::_Vector_impl" = type { %"struct.std::_Vector_base<SegmentTree<int, int>::TreeNode, std::allocator<SegmentTree<int, int>::TreeNode>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SegmentTree<int, int>::TreeNode, std::allocator<SegmentTree<int, int>::TreeNode>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.15" = type { %"class.std::_Function_base", ptr }
%"class.std::function.17" = type { %"class.std::_Function_base", ptr }
%"class.std::function.19" = type { %"class.std::_Function_base", ptr }
%class.anon = type { i8 }
%"class.std::function.21" = type { %"class.std::_Function_base", ptr }
%class.anon.23 = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7queryUpiiRKSt6vectorIiSaIiEERK12WeightedTreeIiERK23HeavyLightDecompositionIiER11SegmentTreeIiiE(i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(168)) #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %class.WeightedTree, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.5", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca %class.HeavyLightDecomposition, align 8
  %13 = alloca %struct.SegmentTree, align 8
  %14 = alloca %"class.std::function", align 8
  %15 = alloca %class.anon, align 1
  %16 = alloca %"class.std::function.21", align 8
  %17 = alloca %class.anon.23, align 1
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %26 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %27 = load ptr, ptr @stdin, align 8, !tbaa !5
  %28 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.2, ptr noundef %27)
  %29 = load ptr, ptr @stdout, align 8, !tbaa !5
  %30 = call ptr @freopen(ptr noundef @.str.3, ptr noundef @.str.1, ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 80, ptr %4) #6
  call void @_ZN12WeightedTreeIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %32 = load i32, ptr %2, align 4, !tbaa !9
  invoke void @_ZN12WeightedTreeIiE5resetEi(ptr noundef nonnull align 8 dereferenceable(80) %4, i32 noundef %32)
          to label %33 unwind label %40

33:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %53, %33
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = load i32, ptr %2, align 4, !tbaa !9
  %37 = sub nsw i32 %36, 1
  %38 = icmp slt i32 %35, %37
  br i1 %38, label %44, label %39

39:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %65

40:                                               ; preds = %0
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %5, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %6, align 4
  br label %178

44:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %45 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %9, ptr noundef %10)
          to label %46 unwind label %56

46:                                               ; preds = %44
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN12WeightedTreeIiE7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(80) %4, i32 noundef %47, i32 noundef %48, i32 noundef 1)
          to label %49 unwind label %56

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %50 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %51 unwind label %60

51:                                               ; preds = %49
  store i64 %50, ptr %11, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %52 unwind label %60

52:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %8, align 4, !tbaa !9
  br label %34, !llvm.loop !11

56:                                               ; preds = %46, %44
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %5, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %6, align 4
  br label %64

60:                                               ; preds = %51, %49
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %5, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %64

64:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %177

65:                                               ; preds = %39
  invoke void @_ZN12WeightedTreeIiE7setRootEi(ptr noundef nonnull align 8 dereferenceable(80) %4, i32 noundef 1)
          to label %66 unwind label %81

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 96, ptr %12) #6
  invoke void @_ZN23HeavyLightDecompositionIiEC2ERK12WeightedTreeIiE(ptr noundef nonnull align 8 dereferenceable(92) %12, ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %67 unwind label %85

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 168, ptr %13) #6
  %68 = load i32, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  call void @"_ZNSt8functionIFiRKiS1_EEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @"_ZNSt8functionIFiiiiEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZN11SegmentTreeIiiEC2EiiiRKSt8functionIFiRKiS3_EERKS1_IFiiiiEE(ptr noundef nonnull align 8 dereferenceable(168) %13, i32 noundef 1, i32 noundef %68, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %69 unwind label %89

69:                                               ; preds = %67
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  %70 = load i32, ptr %2, align 4, !tbaa !9
  invoke void @_ZN11SegmentTreeIiiE6updateEiii(ptr noundef nonnull align 8 dereferenceable(168) %13, i32 noundef 1, i32 noundef %70, i32 noundef 0)
          to label %71 unwind label %93

71:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %72 = load i32, ptr %2, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %74, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %75 unwind label %97

75:                                               ; preds = %71
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %167, %75
  %77 = load i32, ptr %20, align 4, !tbaa !9
  %78 = load i32, ptr %3, align 4, !tbaa !9
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %101, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %171

81:                                               ; preds = %65
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %5, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %6, align 4
  br label %177

85:                                               ; preds = %66
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %5, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %6, align 4
  br label %176

89:                                               ; preds = %67
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %5, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %6, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %175

93:                                               ; preds = %69
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %5, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %6, align 4
  br label %174

97:                                               ; preds = %71
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %5, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  br label %173

101:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %102 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %21)
          to label %103 unwind label %127

103:                                              ; preds = %101
  %104 = load i32, ptr %21, align 4, !tbaa !9
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %140

106:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %107 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %22)
          to label %108 unwind label %131

108:                                              ; preds = %106
  %109 = load i32, ptr %22, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %110) #6
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = sub nsw i32 1, %112
  %114 = load i32, ptr %22, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %115) #6
  store i32 %113, ptr %116, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %117 = load i32, ptr %22, align 4, !tbaa !9
  %118 = invoke noundef i32 @_ZNK23HeavyLightDecompositionIiE12getStartTimeEi(ptr noundef nonnull align 8 dereferenceable(92) %12, i32 noundef %117)
          to label %119 unwind label %135

119:                                              ; preds = %108
  store i32 %118, ptr %23, align 4, !tbaa !9
  %120 = load i32, ptr %23, align 4, !tbaa !9
  %121 = load i32, ptr %23, align 4, !tbaa !9
  %122 = load i32, ptr %22, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %123) #6
  %125 = load i32, ptr %124, align 4, !tbaa !9
  invoke void @_ZN11SegmentTreeIiiE6updateEiii(ptr noundef nonnull align 8 dereferenceable(168) %13, i32 noundef %120, i32 noundef %121, i32 noundef %125)
          to label %126 unwind label %135

126:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %166

127:                                              ; preds = %101
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %5, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %6, align 4
  br label %170

131:                                              ; preds = %106
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %5, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %6, align 4
  br label %139

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

139:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %170

140:                                              ; preds = %103
  %141 = load i32, ptr %21, align 4, !tbaa !9
  %142 = icmp eq i32 %141, 1
  br i1 %142, label %143, label %165

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %144 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %24)
          to label %145 unwind label %152

145:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %146 = load i32, ptr %24, align 4, !tbaa !9
  %147 = invoke noundef i32 @_Z7queryUpiiRKSt6vectorIiSaIiEERK12WeightedTreeIiERK23HeavyLightDecompositionIiER11SegmentTreeIiiE(i32 noundef %146, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(92) %12, ptr noundef nonnull align 8 dereferenceable(168) %13)
          to label %148 unwind label %156

148:                                              ; preds = %145
  store i32 %147, ptr %25, align 4, !tbaa !9
  %149 = load i32, ptr %25, align 4, !tbaa !9
  %150 = icmp eq i32 %149, 2000000000
  br i1 %150, label %151, label %160

151:                                              ; preds = %148
  store i32 -1, ptr %25, align 4, !tbaa !9
  br label %160

152:                                              ; preds = %143
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %5, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %6, align 4
  br label %164

156:                                              ; preds = %160, %145
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %5, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %164

160:                                              ; preds = %151, %148
  %161 = load i32, ptr %25, align 4, !tbaa !9
  %162 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %161)
          to label %163 unwind label %156

163:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %165

164:                                              ; preds = %156, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %170

165:                                              ; preds = %163, %140
  br label %166

166:                                              ; preds = %165, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %167

167:                                              ; preds = %166
  %168 = load i32, ptr %20, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %20, align 4, !tbaa !9
  br label %76, !llvm.loop !13

170:                                              ; preds = %164, %139, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  br label %173

171:                                              ; preds = %80
  store i32 0, ptr %1, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @_ZN11SegmentTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(168) %13) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %13) #6
  call void @_ZN23HeavyLightDecompositionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(92) %12) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %172 = load i32, ptr %1, align 4
  ret i32 %172

173:                                              ; preds = %170, %97
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %174

174:                                              ; preds = %173, %93
  call void @_ZN11SegmentTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(168) %13) #6
  br label %175

175:                                              ; preds = %174, %89
  call void @llvm.lifetime.end.p0(i64 168, ptr %13) #6
  call void @_ZN23HeavyLightDecompositionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(92) %12) #6
  br label %176

176:                                              ; preds = %175, %85
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #6
  br label %177

177:                                              ; preds = %176, %81, %64
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %178

178:                                              ; preds = %177, %40
  call void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %5, align 8
  %181 = load i32, ptr %6, align 4
  %182 = insertvalue { ptr, i32 } poison, ptr %180, 0
  %183 = insertvalue { ptr, i32 } %182, i32 %181, 1
  resume { ptr, i32 } %183
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11SegmentTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN23HeavyLightDecompositionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(92)) unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #5 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !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.WeightedTree = type { %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector", i32, i32 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_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<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }
%"struct.std::pair" = type { i32, i32 }
%class.HeavyLightDecomposition = type <{ ptr, i32, [4 x i8], %"class.std::vector", %"class.std::vector", %"class.std::vector", i32, [4 x i8] }>
%struct.SegmentTree = type { %"class.std::vector.10", %"class.std::function", %"class.std::function.15", %"class.std::function.17", %"class.std::function.19", i32, i32, i32, i32 }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<SegmentTree<int, int>::TreeNode, std::allocator<SegmentTree<int, int>::TreeNode>>::_Vector_impl" }
%"struct.std::_Vector_base<SegmentTree<int, int>::TreeNode, std::allocator<SegmentTree<int, int>::TreeNode>>::_Vector_impl" = type { %"struct.std::_Vector_base<SegmentTree<int, int>::TreeNode, std::allocator<SegmentTree<int, int>::TreeNode>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SegmentTree<int, int>::TreeNode, std::allocator<SegmentTree<int, int>::TreeNode>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.15" = type { %"class.std::_Function_base", ptr }
%"class.std::function.17" = type { %"class.std::_Function_base", ptr }
%"class.std::function.19" = type { %"class.std::_Function_base", ptr }
%class.anon = type { i8 }
%"class.std::function.21" = type { %"class.std::_Function_base", ptr }
%class.anon.23 = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7queryUpiiRKSt6vectorIiSaIiEERK12WeightedTreeIiERK23HeavyLightDecompositionIiER11SegmentTreeIiiE(i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %class.WeightedTree, align 8
  %4 = alloca %"class.std::vector.5", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %class.HeavyLightDecomposition, align 8
  %9 = alloca %struct.SegmentTree, align 8
  %10 = alloca %"class.std::function", align 8
  %11 = alloca %class.anon, align 1
  %12 = alloca %"class.std::function.21", align 8
  %13 = alloca %class.anon.23, align 1
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = load ptr, ptr @stdin, align 8, !tbaa !5
  %21 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, ptr noundef %20)
  %22 = load ptr, ptr @stdout, align 8, !tbaa !5
  %23 = tail call ptr @freopen(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, ptr noundef %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #7
  call void @_ZN12WeightedTreeIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %25 = load i32, ptr %1, align 4, !tbaa !9
  invoke void @_ZN12WeightedTreeIiE5resetEi(ptr noundef nonnull align 8 dereferenceable(80) %3, i32 noundef %25)
          to label %26 unwind label %29

26:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %27 = load i32, ptr %1, align 4, !tbaa !9
  %28 = icmp sgt i32 %27, 1
  br i1 %28, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %37, %26
  invoke void @_ZN12WeightedTreeIiE7setRootEi(ptr noundef nonnull align 8 dereferenceable(80) %3, i32 noundef 1)
          to label %47 unwind label %59

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %109

.lr.ph:                                           ; preds = %26, %37
  %.01130 = phi i32 [ %38, %37 ], [ 0, %26 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZN12WeightedTreeIiE7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(80) %3, i32 noundef %32, i32 noundef %33, i32 noundef 1)
          to label %34 unwind label %42

34:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %35 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %36 unwind label %44

36:                                               ; preds = %34
  store i64 %35, ptr %7, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %37 unwind label %44

37:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %38 = add nuw nsw i32 %.01130, 1
  %39 = load i32, ptr %1, align 4, !tbaa !9
  %40 = add nsw i32 %39, -1
  %41 = icmp slt i32 %38, %40
  br i1 %41, label %.lr.ph, label %._crit_edge, !llvm.loop !11

42:                                               ; preds = %.lr.ph
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %46

44:                                               ; preds = %36, %34
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %46

46:                                               ; preds = %44, %42
  %.pn26 = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  br label %108

47:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %8) #7
  invoke void @_ZN23HeavyLightDecompositionIiEC2ERK12WeightedTreeIiE(ptr noundef nonnull align 8 dereferenceable(92) %8, ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %48 unwind label %61

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %9) #7
  %49 = load i32, ptr %1, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  call void @"_ZNSt8functionIFiRKiS1_EEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  call void @"_ZNSt8functionIFiiiiEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZN11SegmentTreeIiiEC2EiiiRKSt8functionIFiRKiS3_EERKS1_IFiiiiEE(ptr noundef nonnull align 8 dereferenceable(168) %9, i32 noundef 1, i32 noundef %49, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %50 unwind label %63

50:                                               ; preds = %48
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  %51 = load i32, ptr %1, align 4, !tbaa !9
  invoke void @_ZN11SegmentTreeIiiE6updateEiii(ptr noundef nonnull align 8 dereferenceable(168) %9, i32 noundef 1, i32 noundef %51, i32 noundef 0)
          to label %52 unwind label %65

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #7
  %53 = load i32, ptr %1, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %55, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %56 unwind label %67

56:                                               ; preds = %52
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  %57 = load i32, ptr %2, align 4, !tbaa !9
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph33, label %._crit_edge34

._crit_edge34:                                    ; preds = %99, %56
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  call void @_ZN11SegmentTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(168) %9) #7
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %9) #7
  call void @_ZN23HeavyLightDecompositionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(92) %8) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %8) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

59:                                               ; preds = %._crit_edge
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %108

61:                                               ; preds = %47
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %107

63:                                               ; preds = %48
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %106

65:                                               ; preds = %50
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %105

67:                                               ; preds = %52
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  br label %104

.lr.ph33:                                         ; preds = %56, %99
  %.01031 = phi i32 [ %100, %99 ], [ 0, %56 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  %69 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %16)
  %70 = load i32, ptr %16, align 4, !tbaa !9
  switch i32 %70, label %99 [
    i32 0, label %71
    i32 1, label %90
  ]

71:                                               ; preds = %.lr.ph33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  %72 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %17)
  %73 = load i32, ptr %17, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %74) #7
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = sub nsw i32 1, %76
  %78 = load i32, ptr %17, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %79) #7
  store i32 %77, ptr %80, align 4, !tbaa !9
  %81 = load i32, ptr %17, align 4, !tbaa !9
  %82 = call noundef i32 @_ZNK23HeavyLightDecompositionIiE12getStartTimeEi(ptr noundef nonnull align 8 dereferenceable(92) %8, i32 noundef %81)
  %83 = load i32, ptr %17, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %84) #7
  %86 = load i32, ptr %85, align 4, !tbaa !9
  invoke void @_ZN11SegmentTreeIiiE6updateEiii(ptr noundef nonnull align 8 dereferenceable(168) %9, i32 noundef %82, i32 noundef %82, i32 noundef %86)
          to label %87 unwind label %88

87:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  br label %99

88:                                               ; preds = %71
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  br label %103

90:                                               ; preds = %.lr.ph33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  %91 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %18)
  %92 = load i32, ptr %18, align 4, !tbaa !9
  %93 = invoke noundef i32 @_Z7queryUpiiRKSt6vectorIiSaIiEERK12WeightedTreeIiERK23HeavyLightDecompositionIiER11SegmentTreeIiiE(i32 noundef %92, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(92) %8, ptr noundef nonnull align 8 dereferenceable(168) %9)
          to label %94 unwind label %97

94:                                               ; preds = %90
  %95 = icmp eq i32 %93, 2000000000
  %spec.store.select = select i1 %95, i32 -1, i32 %93
  %96 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %spec.store.select)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  br label %99

97:                                               ; preds = %90
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  br label %103

99:                                               ; preds = %.lr.ph33, %94, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  %100 = add nuw nsw i32 %.01031, 1
  %101 = load i32, ptr %2, align 4, !tbaa !9
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %.lr.ph33, label %._crit_edge34, !llvm.loop !13

103:                                              ; preds = %97, %88
  %.pn = phi { ptr, i32 } [ %89, %88 ], [ %98, %97 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  br label %104

104:                                              ; preds = %103, %67
  %.pn.pn = phi { ptr, i32 } [ %.pn, %103 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  br label %105

105:                                              ; preds = %104, %65
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %104 ], [ %66, %65 ]
  call void @_ZN11SegmentTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(168) %9) #7
  br label %106

106:                                              ; preds = %105, %63
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %105 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %9) #7
  call void @_ZN23HeavyLightDecompositionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(92) %8) #7
  br label %107

107:                                              ; preds = %106, %61
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %106 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %8) #7
  br label %108

108:                                              ; preds = %107, %59, %46
  %.pn26.pn = phi { ptr, i32 } [ %.pn26, %46 ], [ %.pn.pn.pn.pn.pn, %107 ], [ %60, %59 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %109

109:                                              ; preds = %108, %29
  %.pn26.pn.pn = phi { ptr, i32 } [ %.pn26.pn, %108 ], [ %30, %29 ]
  call void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn26.pn.pn
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

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

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

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

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

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

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

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

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


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