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

; 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::allocator" = type { i8 }
%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.TreeToArray = type { ptr, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%class.RangeUpdateTree = type <{ ptr, %class.RangeUpdateArray, i32, [4 x i8] }>
%class.RangeUpdateArray = type { %class.BinaryIndexedTree, i32, i32 }
%class.BinaryIndexedTree = type <{ %"class.std::vector", i32, i32, i32, [4 x i8] }>

@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 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::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %class.WeightedTree, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %class.TreeToArray, align 8
  %14 = alloca %class.RangeUpdateTree, align 8
  %15 = alloca %class.RangeUpdateTree, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %24 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %25 = load ptr, ptr @stdin, align 8, !tbaa !5
  %26 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #7
  %29 = load i32, ptr %2, align 4, !tbaa !9
  %30 = add nsw i32 %29, 1
  %31 = sext i32 %30 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %32 unwind label %38

32:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %48, %32
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = load i32, ptr %2, align 4, !tbaa !9
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %42, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %55

38:                                               ; preds = %0
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %6, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  br label %223

42:                                               ; preds = %33
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %44) #7
  %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) %45)
          to label %47 unwind label %51

47:                                               ; preds = %42
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %8, align 4, !tbaa !9
  br label %33, !llvm.loop !11

51:                                               ; preds = %42
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %6, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %222

55:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #7
  %56 = load i32, ptr %2, align 4, !tbaa !9
  invoke void @_ZN12WeightedTreeIiEC2Ei(ptr noundef nonnull align 8 dereferenceable(80) %9, i32 noundef %56)
          to label %57 unwind label %64

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %76, %57
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = load i32, ptr %2, align 4, !tbaa !9
  %61 = sub nsw i32 %60, 1
  %62 = icmp slt i32 %59, %61
  br i1 %62, label %68, label %63

63:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %83

64:                                               ; preds = %55
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %6, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %7, align 4
  br label %221

68:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %69 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %70 unwind label %79

70:                                               ; preds = %68
  %71 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %72 unwind label %79

72:                                               ; preds = %70
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !9
  invoke void @_ZN12WeightedTreeIiE7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(80) %9, i32 noundef %73, i32 noundef %74, i32 noundef 1)
          to label %75 unwind label %79

75:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %10, align 4, !tbaa !9
  br label %58, !llvm.loop !13

79:                                               ; preds = %72, %70, %68
  %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 %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %220

83:                                               ; preds = %63
  invoke void @_ZN12WeightedTreeIiE7setRootEi(ptr noundef nonnull align 8 dereferenceable(80) %9, i32 noundef 1)
          to label %84 unwind label %93

84:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 88, ptr %13) #7
  invoke void @_ZN11TreeToArrayIiEC2ERK12WeightedTreeIiE(ptr noundef nonnull align 8 dereferenceable(88) %13, ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %85 unwind label %97

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #7
  invoke void @_ZN15RangeUpdateTreeIiiEC2ERK11TreeToArrayIiE(ptr noundef nonnull align 8 dereferenceable(60) %14, ptr noundef nonnull align 8 dereferenceable(88) %13)
          to label %86 unwind label %101

86:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #7
  invoke void @_ZN15RangeUpdateTreeIiiEC2ERK11TreeToArrayIiE(ptr noundef nonnull align 8 dereferenceable(60) %15, ptr noundef nonnull align 8 dereferenceable(88) %13)
          to label %87 unwind label %105

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %120, %87
  %89 = load i32, ptr %16, align 4, !tbaa !9
  %90 = load i32, ptr %2, align 4, !tbaa !9
  %91 = icmp sle i32 %89, %90
  br i1 %91, label %109, label %92

92:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %127

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

97:                                               ; preds = %84
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %6, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %7, align 4
  br label %219

101:                                              ; preds = %85
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %6, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %7, align 4
  br label %218

105:                                              ; preds = %86
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %6, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %7, align 4
  br label %217

109:                                              ; preds = %88
  %110 = load i32, ptr %16, align 4, !tbaa !9
  %111 = load i32, ptr %16, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %112) #7
  invoke void @_ZN15RangeUpdateTreeIiiE7addNodeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %14, i32 noundef %110, ptr noundef nonnull align 4 dereferenceable(4) %113)
          to label %114 unwind label %123

114:                                              ; preds = %109
  %115 = load i32, ptr %16, align 4, !tbaa !9
  %116 = load i32, ptr %16, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %117) #7
  invoke void @_ZN15RangeUpdateTreeIiiE7addNodeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %15, i32 noundef %115, ptr noundef nonnull align 4 dereferenceable(4) %118)
          to label %119 unwind label %123

119:                                              ; preds = %114
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %16, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %16, align 4, !tbaa !9
  br label %88, !llvm.loop !14

123:                                              ; preds = %114, %109
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %6, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %216

127:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %210, %127
  %129 = load i32, ptr %17, align 4, !tbaa !9
  %130 = load i32, ptr %3, align 4, !tbaa !9
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %214

133:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %134 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %135 unwind label %155

135:                                              ; preds = %133
  %136 = load i32, ptr %18, align 4, !tbaa !9
  %137 = icmp eq i32 %136, 1
  br i1 %137, label %138, label %180

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %140 unwind label %159

140:                                              ; preds = %138
  %141 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %139, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %142 unwind label %159

142:                                              ; preds = %140
  %143 = load i32, ptr %19, align 4, !tbaa !9
  %144 = invoke noundef i32 @_ZNK12WeightedTreeIiE8getDepthEi(ptr noundef nonnull align 8 dereferenceable(80) %9, i32 noundef %143)
          to label %145 unwind label %159

145:                                              ; preds = %142
  %146 = srem i32 %144, 2
  %147 = icmp eq i32 %146, 0
  br i1 %147, label %148, label %167

148:                                              ; preds = %145
  %149 = load i32, ptr %19, align 4, !tbaa !9
  invoke void @_ZN15RangeUpdateTreeIiiE10addSubtreeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %15, i32 noundef %149, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %150 unwind label %159

150:                                              ; preds = %148
  %151 = load i32, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %152 = load i32, ptr %20, align 4, !tbaa !9
  %153 = sub nsw i32 0, %152
  store i32 %153, ptr %21, align 4, !tbaa !9
  invoke void @_ZN15RangeUpdateTreeIiiE10addSubtreeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %14, i32 noundef %151, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %154 unwind label %163

154:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %178

155:                                              ; preds = %133
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %6, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %7, align 4
  br label %213

159:                                              ; preds = %167, %148, %142, %140, %138
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %6, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %7, align 4
  br label %179

163:                                              ; preds = %150
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %6, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %179

167:                                              ; preds = %145
  %168 = load i32, ptr %19, align 4, !tbaa !9
  invoke void @_ZN15RangeUpdateTreeIiiE10addSubtreeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %14, i32 noundef %168, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %169 unwind label %159

169:                                              ; preds = %167
  %170 = load i32, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %171 = load i32, ptr %20, align 4, !tbaa !9
  %172 = sub nsw i32 0, %171
  store i32 %172, ptr %22, align 4, !tbaa !9
  invoke void @_ZN15RangeUpdateTreeIiiE10addSubtreeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %15, i32 noundef %170, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %173 unwind label %174

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

174:                                              ; preds = %169
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %6, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %179

178:                                              ; preds = %173, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %209

179:                                              ; preds = %174, %163, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %213

180:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %181 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %182 unwind label %196

182:                                              ; preds = %180
  %183 = load i32, ptr %23, align 4, !tbaa !9
  %184 = invoke noundef i32 @_ZNK12WeightedTreeIiE8getDepthEi(ptr noundef nonnull align 8 dereferenceable(80) %9, i32 noundef %183)
          to label %185 unwind label %196

185:                                              ; preds = %182
  %186 = srem i32 %184, 2
  %187 = icmp eq i32 %186, 0
  br i1 %187, label %188, label %200

188:                                              ; preds = %185
  %189 = load i32, ptr %23, align 4, !tbaa !9
  %190 = invoke noundef i32 @_ZN15RangeUpdateTreeIiiEixEi(ptr noundef nonnull align 8 dereferenceable(60) %15, i32 noundef %189)
          to label %191 unwind label %196

191:                                              ; preds = %188
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %190)
          to label %193 unwind label %196

193:                                              ; preds = %191
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %192, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %195 unwind label %196

195:                                              ; preds = %193
  br label %208

196:                                              ; preds = %205, %203, %200, %193, %191, %188, %182, %180
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %6, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %213

200:                                              ; preds = %185
  %201 = load i32, ptr %23, align 4, !tbaa !9
  %202 = invoke noundef i32 @_ZN15RangeUpdateTreeIiiEixEi(ptr noundef nonnull align 8 dereferenceable(60) %14, i32 noundef %201)
          to label %203 unwind label %196

203:                                              ; preds = %200
  %204 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %202)
          to label %205 unwind label %196

205:                                              ; preds = %203
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %204, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %207 unwind label %196

207:                                              ; preds = %205
  br label %208

208:                                              ; preds = %207, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %209

209:                                              ; preds = %208, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %17, align 4, !tbaa !9
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %17, align 4, !tbaa !9
  br label %128, !llvm.loop !15

213:                                              ; preds = %196, %179, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %216

214:                                              ; preds = %132
  store i32 0, ptr %1, align 4
  call void @_ZN15RangeUpdateTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(60) %15) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  call void @_ZN15RangeUpdateTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(60) %14) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #7
  call void @_ZN11TreeToArrayIiED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %13) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr %13) #7
  call void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %215 = load i32, ptr %1, align 4
  ret i32 %215

216:                                              ; preds = %213, %123
  call void @_ZN15RangeUpdateTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(60) %15) #7
  br label %217

217:                                              ; preds = %216, %105
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  call void @_ZN15RangeUpdateTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(60) %14) #7
  br label %218

218:                                              ; preds = %217, %101
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #7
  call void @_ZN11TreeToArrayIiED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %13) #7
  br label %219

219:                                              ; preds = %218, %97
  call void @llvm.lifetime.end.p0(i64 88, ptr %13) #7
  br label %220

220:                                              ; preds = %219, %93, %79
  call void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  br label %221

221:                                              ; preds = %220, %64
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #7
  br label %222

222:                                              ; preds = %221, %51
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %223

223:                                              ; preds = %222, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %224

224:                                              ; preds = %223
  %225 = load ptr, ptr %6, align 8
  %226 = load i32, ptr %7, align 4
  %227 = insertvalue { ptr, i32 } poison, ptr %225, 0
  %228 = insertvalue { ptr, i32 } %227, i32 %226, 1
  resume { ptr, i32 } %228
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15RangeUpdateTreeIiiEC2ERK11TreeToArrayIiE(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN15RangeUpdateTreeIiiEixEi(ptr noundef nonnull align 8 dereferenceable(60), i32 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)) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11TreeToArrayIiED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #6 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 @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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

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 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 #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !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::allocator" = type { i8 }
%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.TreeToArray = type { ptr, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%class.RangeUpdateTree = type <{ ptr, %class.RangeUpdateArray, i32, [4 x i8] }>
%class.RangeUpdateArray = type { %class.BinaryIndexedTree, i32, i32 }
%class.BinaryIndexedTree = type <{ %"class.std::vector", i32, i32, i32, [4 x i8] }>

@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 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::allocator", align 1
  %5 = alloca %class.WeightedTree, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %class.TreeToArray, align 8
  %9 = alloca %class.RangeUpdateTree, align 8
  %10 = alloca %class.RangeUpdateTree, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %18 = load ptr, ptr @stdin, align 8, !tbaa !5
  %19 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %22 = load i32, ptr %1, align 4, !tbaa !9
  %23 = add nsw i32 %22, 1
  %24 = sext i32 %23 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %24, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %25 unwind label %29

25:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  %26 = load i32, ptr %1, align 4, !tbaa !9
  %.not46 = icmp slt i32 %26, 1
  br i1 %.not46, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %33, %25
  %.lcssa = phi i32 [ %26, %25 ], [ %34, %33 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #7
  invoke void @_ZN12WeightedTreeIiEC2Ei(ptr noundef nonnull align 8 dereferenceable(80) %5, i32 noundef %.lcssa)
          to label %.preheader44 unwind label %38

.preheader44:                                     ; preds = %._crit_edge
  %27 = load i32, ptr %1, align 4, !tbaa !9
  %28 = icmp sgt i32 %27, 1
  br i1 %28, label %.lr.ph49, label %._crit_edge50

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  br label %138

.lr.ph:                                           ; preds = %25, %33
  %indvars.iv = phi i64 [ %indvars.iv.next, %33 ], [ 1, %25 ]
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %33 unwind label %36

33:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %34 = load i32, ptr %1, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %.not.not = icmp slt i64 %indvars.iv, %35
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

36:                                               ; preds = %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %137

._crit_edge50:                                    ; preds = %46, %.preheader44
  invoke void @_ZN12WeightedTreeIiE7setRootEi(ptr noundef nonnull align 8 dereferenceable(80) %5, i32 noundef 1)
          to label %53 unwind label %59

38:                                               ; preds = %._crit_edge
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %136

.lr.ph49:                                         ; preds = %.preheader44, %46
  %.01648 = phi i32 [ %47, %46 ], [ 0, %.preheader44 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %40 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %41 unwind label %51

41:                                               ; preds = %.lr.ph49
  %42 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %43 unwind label %51

43:                                               ; preds = %41
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN12WeightedTreeIiE7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(80) %5, i32 noundef %44, i32 noundef %45, i32 noundef 1)
          to label %46 unwind label %51

46:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %47 = add nuw nsw i32 %.01648, 1
  %48 = load i32, ptr %1, align 4, !tbaa !9
  %49 = add nsw i32 %48, -1
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %.lr.ph49, label %._crit_edge50, !llvm.loop !13

51:                                               ; preds = %43, %41, %.lr.ph49
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %135

53:                                               ; preds = %._crit_edge50
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %8) #7
  invoke void @_ZN11TreeToArrayIiEC2ERK12WeightedTreeIiE(ptr noundef nonnull align 8 dereferenceable(88) %8, ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %54 unwind label %61

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #7
  invoke void @_ZN15RangeUpdateTreeIiiEC2ERK11TreeToArrayIiE(ptr noundef nonnull align 8 dereferenceable(60) %9, ptr noundef nonnull align 8 dereferenceable(88) %8)
          to label %55 unwind label %63

55:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #7
  invoke void @_ZN15RangeUpdateTreeIiiEC2ERK11TreeToArrayIiE(ptr noundef nonnull align 8 dereferenceable(60) %10, ptr noundef nonnull align 8 dereferenceable(88) %8)
          to label %.preheader43 unwind label %65

.preheader43:                                     ; preds = %55
  %56 = load i32, ptr %1, align 4, !tbaa !9
  %.not2951 = icmp slt i32 %56, 1
  br i1 %.not2951, label %.preheader, label %.lr.ph53

.preheader:                                       ; preds = %71, %.preheader43
  %57 = load i32, ptr %2, align 4, !tbaa !9
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph55, label %._crit_edge56

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

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

63:                                               ; preds = %54
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %133

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

.lr.ph53:                                         ; preds = %.preheader43, %71
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %71 ], [ 1, %.preheader43 ]
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv59) #7
  %68 = trunc nuw nsw i64 %indvars.iv59 to i32
  invoke void @_ZN15RangeUpdateTreeIiiE7addNodeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %9, i32 noundef %68, ptr noundef nonnull align 4 dereferenceable(4) %67)
          to label %69 unwind label %74

69:                                               ; preds = %.lr.ph53
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv59) #7
  invoke void @_ZN15RangeUpdateTreeIiiE7addNodeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %10, i32 noundef %68, ptr noundef nonnull align 4 dereferenceable(4) %70)
          to label %71 unwind label %74

71:                                               ; preds = %69
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %72 = load i32, ptr %1, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %.not29.not = icmp slt i64 %indvars.iv59, %73
  br i1 %.not29.not, label %.lr.ph53, label %.preheader, !llvm.loop !14

74:                                               ; preds = %69, %.lr.ph53
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %131

._crit_edge56:                                    ; preds = %126, %.preheader
  call void @_ZN15RangeUpdateTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(60) %10) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  call void @_ZN15RangeUpdateTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(60) %9) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  call void @_ZN11TreeToArrayIiED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %8) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %8) #7
  call void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, 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

.lr.ph55:                                         ; preds = %.preheader, %126
  %.054 = phi i32 [ %127, %126 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %76 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %77 unwind label %96

77:                                               ; preds = %.lr.ph55
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = icmp eq i32 %78, 1
  br i1 %79, label %80, label %112

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %81 = 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 %82 unwind label %98

82:                                               ; preds = %80
  %83 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %81, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %84 unwind label %98

84:                                               ; preds = %82
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = call noundef i32 @_ZNK12WeightedTreeIiE8getDepthEi(ptr noundef nonnull align 8 dereferenceable(80) %5, i32 noundef %85)
  %87 = and i32 %86, 1
  %88 = icmp eq i32 %87, 0
  %89 = load i32, ptr %12, align 4, !tbaa !9
  br i1 %88, label %90, label %102

90:                                               ; preds = %84
  invoke void @_ZN15RangeUpdateTreeIiiE10addSubtreeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %10, i32 noundef %89, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %91 unwind label %98

91:                                               ; preds = %90
  %92 = load i32, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = sub nsw i32 0, %93
  store i32 %94, ptr %14, align 4, !tbaa !9
  invoke void @_ZN15RangeUpdateTreeIiiE10addSubtreeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %9, i32 noundef %92, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %95 unwind label %100

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  br label %110

96:                                               ; preds = %.lr.ph55
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %130

98:                                               ; preds = %102, %90, %82, %80
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %111

100:                                              ; preds = %91
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  br label %111

102:                                              ; preds = %84
  invoke void @_ZN15RangeUpdateTreeIiiE10addSubtreeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %9, i32 noundef %89, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %103 unwind label %98

103:                                              ; preds = %102
  %104 = load i32, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = sub nsw i32 0, %105
  store i32 %106, ptr %15, align 4, !tbaa !9
  invoke void @_ZN15RangeUpdateTreeIiiE10addSubtreeEiRKi(ptr noundef nonnull align 8 dereferenceable(60) %10, i32 noundef %104, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %107 unwind label %108

107:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %110

108:                                              ; preds = %103
  %109 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %111

110:                                              ; preds = %107, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %126

111:                                              ; preds = %108, %100, %98
  %.pn = phi { ptr, i32 } [ %101, %100 ], [ %99, %98 ], [ %109, %108 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %130

112:                                              ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  %113 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %.invoke64 unwind label %121

.invoke64:                                        ; preds = %112
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = call noundef i32 @_ZNK12WeightedTreeIiE8getDepthEi(ptr noundef nonnull align 8 dereferenceable(80) %5, i32 noundef %114)
  %116 = and i32 %115, 1
  %117 = icmp eq i32 %116, 0
  %118 = load i32, ptr %16, align 4, !tbaa !9
  %119 = select i1 %117, ptr %10, ptr %9
  %120 = invoke noundef i32 @_ZN15RangeUpdateTreeIiiEixEi(ptr noundef nonnull align 8 dereferenceable(60) %119, i32 noundef %118)
          to label %.invoke63 unwind label %121

121:                                              ; preds = %.invoke64, %.invoke63, %.invoke, %112
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %130

.invoke63:                                        ; preds = %.invoke64
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %120)
          to label %.invoke unwind label %121

.invoke:                                          ; preds = %.invoke63
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %125 unwind label %121

125:                                              ; preds = %.invoke
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %126

126:                                              ; preds = %125, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  %127 = add nuw nsw i32 %.054, 1
  %128 = load i32, ptr %2, align 4, !tbaa !9
  %129 = icmp slt i32 %127, %128
  br i1 %129, label %.lr.ph55, label %._crit_edge56, !llvm.loop !15

130:                                              ; preds = %121, %111, %96
  %.pn.pn = phi { ptr, i32 } [ %.pn, %111 ], [ %122, %121 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  br label %131

131:                                              ; preds = %130, %74
  %.pn32 = phi { ptr, i32 } [ %75, %74 ], [ %.pn.pn, %130 ]
  call void @_ZN15RangeUpdateTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(60) %10) #7
  br label %132

132:                                              ; preds = %131, %65
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %131 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  call void @_ZN15RangeUpdateTreeIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(60) %9) #7
  br label %133

133:                                              ; preds = %132, %63
  %.pn32.pn.pn = phi { ptr, i32 } [ %.pn32.pn, %132 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  call void @_ZN11TreeToArrayIiED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %8) #7
  br label %134

134:                                              ; preds = %133, %61
  %.pn32.pn.pn.pn = phi { ptr, i32 } [ %.pn32.pn.pn, %133 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %8) #7
  br label %135

135:                                              ; preds = %134, %59, %51
  %.pn37 = phi { ptr, i32 } [ %52, %51 ], [ %.pn32.pn.pn.pn, %134 ], [ %60, %59 ]
  call void @_ZN12WeightedTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #7
  br label %136

136:                                              ; preds = %135, %38
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %135 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  br label %137

137:                                              ; preds = %136, %36
  %.pn40 = phi { ptr, i32 } [ %37, %36 ], [ %.pn37.pn, %136 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %138

138:                                              ; preds = %137, %29
  %.pn40.pn = phi { ptr, i32 } [ %.pn40, %137 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, 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 } %.pn40.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress uwtable
declare dso_local void @_ZN12WeightedTreeIiEC2Ei(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) unnamed_addr #4 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 #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15RangeUpdateTreeIiiEC2ERK11TreeToArrayIiE(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN15RangeUpdateTreeIiiEixEi(ptr noundef nonnull align 8 dereferenceable(60), i32 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)) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11TreeToArrayIiED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #6 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 @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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

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 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 #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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