; LLVM IR from kazunetakahashi/atcoder :: 2018/0512_ARC097 (F)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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::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" }

@x = external dso_local global [100010 x i32], align 16
@y = external dso_local global [100010 x i32], align 16
@_Z1SB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@T = external dso_local global [100010 x %"class.std::vector"], align 16
@V = external dso_local global [100010 x %"class.std::vector"], align 16
@root = external dso_local global i32, align 4
@parent = external dso_local global [100010 x i32], align 16
@parent2 = external dso_local global [100010 x i32], align 16
@need = external dso_local global [100010 x i8], align 16
@del = external dso_local global [100010 x i8], align 16
@maxi = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3dfsi(i32 noundef) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4dfs2i(i32 noundef) #0

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %14 = 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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %58, %0
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sub nsw i32 %17, 1
  %19 = icmp slt i32 %16, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %61

21:                                               ; preds = %15
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %27
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr %32, align 4, !tbaa !5
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr %37, align 4, !tbaa !5
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @T, i64 0, i64 %44
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %47
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 4 dereferenceable(4) %48)
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @T, i64 0, i64 %53
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %56
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 4 dereferenceable(4) %57)
  br label %58

58:                                               ; preds = %21
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %3, align 4, !tbaa !5
  br label %15, !llvm.loop !9

61:                                               ; preds = %20
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11)
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #7
  store i8 1, ptr %4, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %77, %61
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 5, ptr %6, align 4
  br label %80

68:                                               ; preds = %63
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %70)
  %72 = load i8, ptr %71, align 1, !tbaa !13
  %73 = sext i8 %72 to i32
  %74 = icmp eq i32 %73, 87
  br i1 %74, label %75, label %76

75:                                               ; preds = %68
  store i8 0, ptr %4, align 1, !tbaa !11
  store i32 5, ptr %6, align 4
  br label %80

76:                                               ; preds = %68
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %5, align 4, !tbaa !5
  br label %63, !llvm.loop !14

80:                                               ; preds = %75, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %81

81:                                               ; preds = %80
  %82 = load i8, ptr %4, align 1, !tbaa !11, !range !15, !noundef !16
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %87

84:                                               ; preds = %81
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  br label %259

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

88:                                               ; preds = %103, %87
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 8, ptr %6, align 4
  br label %106

93:                                               ; preds = %88
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %95)
  %97 = load i8, ptr %96, align 1, !tbaa !13
  %98 = sext i8 %97 to i32
  %99 = icmp eq i32 %98, 87
  br i1 %99, label %100, label %102

100:                                              ; preds = %93
  %101 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %101, ptr @root, align 4, !tbaa !5
  store i32 8, ptr %6, align 4
  br label %106

102:                                              ; preds = %93
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %7, align 4, !tbaa !5
  br label %88, !llvm.loop !17

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

107:                                              ; preds = %106
  %108 = load i32, ptr @root, align 4, !tbaa !5
  %109 = icmp sge i32 %108, 0
  br i1 %109, label %110, label %111

110:                                              ; preds = %107
  br label %113

111:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.5, i32 noundef 142, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

112:                                              ; No predecessors!
  br label %113

113:                                              ; preds = %112, %110
  %114 = load i32, ptr @root, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100010 x i32], ptr @parent2, i64 0, i64 %115
  store i32 -1, ptr %116, align 4, !tbaa !5
  %117 = load i32, ptr @root, align 4, !tbaa !5
  %118 = call noundef zeroext i1 @_Z4dfs2i(i32 noundef %117)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %165, %113
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = load i32, ptr %2, align 4, !tbaa !5
  %122 = sub nsw i32 %121, 1
  %123 = icmp slt i32 %120, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %119
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %168

125:                                              ; preds = %119
  %126 = load i32, ptr %9, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100010 x i8], ptr @del, i64 0, i64 %130
  %132 = load i8, ptr %131, align 1, !tbaa !11, !range !15, !noundef !16
  %133 = trunc i8 %132 to i1
  br i1 %133, label %164, label %134

134:                                              ; preds = %125
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100010 x i8], ptr @del, i64 0, i64 %139
  %141 = load i8, ptr %140, align 1, !tbaa !11, !range !15, !noundef !16
  %142 = trunc i8 %141 to i1
  br i1 %142, label %164, label %143

143:                                              ; preds = %134
  %144 = load i32, ptr %9, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %148
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %151
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %149, ptr noundef nonnull align 4 dereferenceable(4) %152)
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %157
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %160
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %158, ptr noundef nonnull align 4 dereferenceable(4) %161)
  %162 = load i32, ptr %8, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %8, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %143, %134, %125
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %9, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %9, align 4, !tbaa !5
  br label %119, !llvm.loop !18

168:                                              ; preds = %124
  %169 = load i32, ptr %8, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  store i8 0, ptr %11, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @need, ptr noundef getelementptr inbounds (i8, ptr @need, i64 100010), ptr noundef nonnull align 1 dereferenceable(1) %11)
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %208, %168
  %172 = load i32, ptr %12, align 4, !tbaa !5
  %173 = load i32, ptr %2, align 4, !tbaa !5
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %171
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %211

176:                                              ; preds = %171
  %177 = load i32, ptr %12, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [100010 x i8], ptr @del, i64 0, i64 %178
  %180 = load i8, ptr %179, align 1, !tbaa !11, !range !15, !noundef !16
  %181 = trunc i8 %180 to i1
  br i1 %181, label %182, label %183

182:                                              ; preds = %176
  br label %208

183:                                              ; preds = %176
  %184 = load i32, ptr %12, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %185
  %187 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %186) #7
  %188 = trunc i64 %187 to i32
  %189 = srem i32 %188, 2
  %190 = icmp eq i32 %189, 0
  %191 = zext i1 %190 to i32
  %192 = load i32, ptr %12, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %193)
  %195 = load i8, ptr %194, align 1, !tbaa !13
  %196 = sext i8 %195 to i32
  %197 = icmp eq i32 %196, 66
  %198 = zext i1 %197 to i32
  %199 = xor i32 %191, %198
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %207

201:                                              ; preds = %183
  %202 = load i32, ptr %10, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %10, align 4, !tbaa !5
  %204 = load i32, ptr %12, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [100010 x i8], ptr @need, i64 0, i64 %205
  store i8 1, ptr %206, align 1, !tbaa !11
  br label %207

207:                                              ; preds = %201, %183
  br label %208

208:                                              ; preds = %207, %182
  %209 = load i32, ptr %12, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %12, align 4, !tbaa !5
  br label %171, !llvm.loop !19

211:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %233, %211
  %213 = load i32, ptr %13, align 4, !tbaa !5
  %214 = load i32, ptr %2, align 4, !tbaa !5
  %215 = icmp slt i32 %213, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %212
  store i32 17, ptr %6, align 4
  br label %236

217:                                              ; preds = %212
  %218 = load i32, ptr %13, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [100010 x i8], ptr @del, i64 0, i64 %219
  %221 = load i8, ptr %220, align 1, !tbaa !11, !range !15, !noundef !16
  %222 = trunc i8 %221 to i1
  br i1 %222, label %232, label %223

223:                                              ; preds = %217
  %224 = load i32, ptr %13, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %225)
  %227 = load i8, ptr %226, align 1, !tbaa !13
  %228 = sext i8 %227 to i32
  %229 = icmp eq i32 %228, 87
  br i1 %229, label %230, label %232

230:                                              ; preds = %223
  %231 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %231, ptr @root, align 4, !tbaa !5
  store i32 17, ptr %6, align 4
  br label %236

232:                                              ; preds = %223, %217
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %13, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %13, align 4, !tbaa !5
  br label %212, !llvm.loop !20

236:                                              ; preds = %230, %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %237

237:                                              ; preds = %236
  %238 = load i32, ptr @root, align 4, !tbaa !5
  %239 = icmp sge i32 %238, 0
  br i1 %239, label %240, label %241

240:                                              ; preds = %237
  br label %243

241:                                              ; preds = %237
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.5, i32 noundef 179, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

242:                                              ; No predecessors!
  br label %243

243:                                              ; preds = %242, %240
  %244 = load i32, ptr @root, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %245
  store i32 -1, ptr %246, align 4, !tbaa !5
  %247 = load i32, ptr @root, align 4, !tbaa !5
  %248 = call noundef i32 @_Z3dfsi(i32 noundef %247)
  %249 = load i32, ptr %8, align 4, !tbaa !5
  %250 = sub nsw i32 %249, 1
  %251 = mul nsw i32 2, %250
  %252 = load i32, ptr %10, align 4, !tbaa !5
  %253 = add nsw i32 %251, %252
  %254 = load i32, ptr @maxi, align 4, !tbaa !5
  %255 = mul nsw i32 %254, 2
  %256 = sub nsw i32 %253, %255
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %256)
  %258 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %257, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  store i32 0, ptr %6, align 4
  br label %259

259:                                              ; preds = %243, %84
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %260 = load i32, ptr %6, align 4
  switch i32 %260, label %263 [
    i32 0, label %261
    i32 1, label %261
  ]

261:                                              ; preds = %259, %259
  %262 = load i32, ptr %1, align 4
  ret i32 %262

263:                                              ; preds = %259
  unreachable
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #4

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

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

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

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


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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::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" }

@x = external dso_local global [100010 x i32], align 16
@y = external dso_local global [100010 x i32], align 16
@_Z1SB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@T = external dso_local global [100010 x %"class.std::vector"], align 16
@V = external dso_local global [100010 x %"class.std::vector"], align 16
@root = external dso_local local_unnamed_addr global i32, align 4
@parent = external dso_local local_unnamed_addr global [100010 x i32], align 16
@parent2 = external dso_local local_unnamed_addr global [100010 x i32], align 16
@need = external dso_local global [100010 x i8], align 16
@del = external dso_local local_unnamed_addr global [100010 x i8], align 16
@maxi = external dso_local local_unnamed_addr global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3dfsi(i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4dfs2i(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %3 = 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)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 1
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11)
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %.not62 = icmp sgt i32 %7, 0
  br i1 %.not62, label %.lr.ph65, label %.critedge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %8 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %indvars.iv
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %10 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %indvars.iv
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %12 = load i32, ptr %8, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr %8, align 4, !tbaa !5
  %14 = load i32, ptr %10, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr %10, align 4, !tbaa !5
  %16 = sext i32 %13 to i64
  %17 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @T, i64 0, i64 %16
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %18 = load i32, ptr %10, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @T, i64 0, i64 %19
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = add nsw i32 %21, -1
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !9

25:                                               ; preds = %.lr.ph65
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %.not = icmp slt i64 %indvars.iv.next85, %27
  br i1 %.not, label %.lr.ph65, label %.critedge, !llvm.loop !11

.lr.ph65:                                         ; preds = %._crit_edge, %25
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %25 ], [ 0, %._crit_edge ]
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %indvars.iv84)
  %29 = load i8, ptr %28, align 1, !tbaa !12
  %30 = icmp eq i8 %29, 87
  br i1 %30, label %.preheader58, label %25

.preheader58:                                     ; preds = %.lr.ph65
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph67, label %thread-pre-split

.lr.ph67:                                         ; preds = %.preheader58, %38
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %38 ], [ 0, %.preheader58 ]
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %indvars.iv87)
  %34 = load i8, ptr %33, align 1, !tbaa !12
  %35 = icmp eq i8 %34, 87
  br i1 %35, label %36, label %38

36:                                               ; preds = %.lr.ph67
  %37 = trunc nuw nsw i64 %indvars.iv87 to i32
  store i32 %37, ptr @root, align 4, !tbaa !5
  br label %42

38:                                               ; preds = %.lr.ph67
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = icmp slt i64 %indvars.iv.next88, %40
  br i1 %41, label %.lr.ph67, label %thread-pre-split, !llvm.loop !13

thread-pre-split:                                 ; preds = %38, %.preheader58
  %.pr = load i32, ptr @root, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %thread-pre-split, %36
  %43 = phi i32 [ %.pr, %thread-pre-split ], [ %37, %36 ]
  %44 = icmp sgt i32 %43, -1
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.5, i32 noundef 142, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

46:                                               ; preds = %42
  %47 = zext nneg i32 %43 to i64
  %48 = getelementptr inbounds [100010 x i32], ptr @parent2, i64 0, i64 %47
  store i32 -1, ptr %48, align 4, !tbaa !5
  %49 = call noundef zeroext i1 @_Z4dfs2i(i32 noundef %43)
  %50 = load i32, ptr %1, align 4, !tbaa !5
  %51 = icmp sgt i32 %50, 1
  br i1 %51, label %.lr.ph71, label %._crit_edge72

._crit_edge72.loopexit:                           ; preds = %75
  %52 = shl nsw i32 %.147, 1
  br label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge72.loopexit, %46
  %.046.lcssa = phi i32 [ 0, %46 ], [ %52, %._crit_edge72.loopexit ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  store i8 0, ptr %2, align 1, !tbaa !14
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @need, ptr noundef nonnull getelementptr inbounds (i8, ptr @need, i64 100010), ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.lr.ph76, label %thread-pre-split56

.lr.ph71:                                         ; preds = %46, %75
  %55 = phi i32 [ %76, %75 ], [ %50, %46 ]
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %75 ], [ 0, %46 ]
  %.04668 = phi i32 [ %.147, %75 ], [ 0, %46 ]
  %56 = getelementptr inbounds [100010 x i32], ptr @x, i64 0, i64 %indvars.iv90
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100010 x i8], ptr @del, i64 0, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !14, !range !16, !noundef !17
  %61 = trunc nuw i8 %60 to i1
  br i1 %61, label %75, label %62

62:                                               ; preds = %.lr.ph71
  %63 = getelementptr inbounds [100010 x i32], ptr @y, i64 0, i64 %indvars.iv90
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100010 x i8], ptr @del, i64 0, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !14, !range !16, !noundef !17
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %75, label %69

69:                                               ; preds = %62
  %70 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %58
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %70, ptr noundef nonnull align 4 dereferenceable(4) %63)
  %71 = load i32, ptr %63, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %72
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %73, ptr noundef nonnull align 4 dereferenceable(4) %56)
  %74 = add nsw i32 %.04668, 1
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %.lr.ph71, %62, %69
  %76 = phi i32 [ %55, %.lr.ph71 ], [ %55, %62 ], [ %.pre, %69 ]
  %.147 = phi i32 [ %.04668, %.lr.ph71 ], [ %.04668, %62 ], [ %74, %69 ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %77 = add nsw i32 %76, -1
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next91, %78
  br i1 %79, label %.lr.ph71, label %._crit_edge72.loopexit, !llvm.loop !18

.preheader:                                       ; preds = %94
  %80 = icmp sgt i32 %95, 0
  br i1 %80, label %.lr.ph79, label %thread-pre-split56

.lr.ph76:                                         ; preds = %._crit_edge72, %94
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %94 ], [ 0, %._crit_edge72 ]
  %.04473 = phi i32 [ %.1, %94 ], [ 0, %._crit_edge72 ]
  %81 = getelementptr inbounds [100010 x i8], ptr @del, i64 0, i64 %indvars.iv93
  %82 = load i8, ptr %81, align 1, !tbaa !14, !range !16, !noundef !17
  %83 = trunc nuw i8 %82 to i1
  br i1 %83, label %94, label %84

84:                                               ; preds = %.lr.ph76
  %85 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %indvars.iv93
  %86 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %85) #7
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %indvars.iv93)
  %88 = load i8, ptr %87, align 1, !tbaa !12
  %89 = trunc i64 %86 to i1
  %90 = icmp ne i8 %88, 66
  %.not55.not = xor i1 %90, %89
  br i1 %.not55.not, label %91, label %94

91:                                               ; preds = %84
  %92 = add nsw i32 %.04473, 1
  %93 = getelementptr inbounds [100010 x i8], ptr @need, i64 0, i64 %indvars.iv93
  store i8 1, ptr %93, align 1, !tbaa !14
  br label %94

94:                                               ; preds = %84, %91, %.lr.ph76
  %.1 = phi i32 [ %.04473, %.lr.ph76 ], [ %92, %91 ], [ %.04473, %84 ]
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %95 = load i32, ptr %1, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = icmp slt i64 %indvars.iv.next94, %96
  br i1 %97, label %.lr.ph76, label %.preheader, !llvm.loop !19

.lr.ph79:                                         ; preds = %.preheader, %108
  %98 = phi i32 [ %109, %108 ], [ %95, %.preheader ]
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %108 ], [ 0, %.preheader ]
  %99 = getelementptr inbounds [100010 x i8], ptr @del, i64 0, i64 %indvars.iv96
  %100 = load i8, ptr %99, align 1, !tbaa !14, !range !16, !noundef !17
  %101 = trunc nuw i8 %100 to i1
  br i1 %101, label %108, label %102

102:                                              ; preds = %.lr.ph79
  %103 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %indvars.iv96)
  %104 = load i8, ptr %103, align 1, !tbaa !12
  %105 = icmp eq i8 %104, 87
  br i1 %105, label %106, label %._crit_edge99

._crit_edge99:                                    ; preds = %102
  %.pre100 = load i32, ptr %1, align 4, !tbaa !5
  br label %108

106:                                              ; preds = %102
  %107 = trunc nuw nsw i64 %indvars.iv96 to i32
  store i32 %107, ptr @root, align 4, !tbaa !5
  br label %112

108:                                              ; preds = %._crit_edge99, %.lr.ph79
  %109 = phi i32 [ %.pre100, %._crit_edge99 ], [ %98, %.lr.ph79 ]
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %110 = sext i32 %109 to i64
  %111 = icmp slt i64 %indvars.iv.next97, %110
  br i1 %111, label %.lr.ph79, label %thread-pre-split56, !llvm.loop !20

thread-pre-split56:                               ; preds = %108, %._crit_edge72, %.preheader
  %.044.lcssa103 = phi i32 [ %.1, %.preheader ], [ 0, %._crit_edge72 ], [ %.1, %108 ]
  %.pr57 = load i32, ptr @root, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %thread-pre-split56, %106
  %.044.lcssa102 = phi i32 [ %.044.lcssa103, %thread-pre-split56 ], [ %.1, %106 ]
  %113 = phi i32 [ %.pr57, %thread-pre-split56 ], [ %107, %106 ]
  %114 = icmp sgt i32 %113, -1
  br i1 %114, label %116, label %115

115:                                              ; preds = %112
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.5, i32 noundef 179, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

116:                                              ; preds = %112
  %117 = zext nneg i32 %113 to i64
  %118 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %117
  store i32 -1, ptr %118, align 4, !tbaa !5
  %119 = call noundef i32 @_Z3dfsi(i32 noundef %113)
  %120 = add nsw i32 %.044.lcssa102, %.046.lcssa
  %121 = load i32, ptr @maxi, align 4, !tbaa !5
  %122 = shl i32 %121, 1
  %123 = sub i32 %120, %122
  br label %.critedge

.critedge:                                        ; preds = %25, %._crit_edge, %116
  %.sink106 = phi i32 [ %123, %116 ], [ 0, %._crit_edge ], [ 0, %25 ]
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sink106)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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

; 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 #0 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

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

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

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


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