; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/0807_tkppc2 (H)

; 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::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" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@V = external dso_local global [100010 x %"class.std::vector"], align 16
@parent = external dso_local global [18 x [100010 x i32]], align 16
@depth = external dso_local global [100010 x i32], align 16
@ans = external dso_local global [5 x [100010 x i64]], align 16
@red = external dso_local global [100010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3lcaii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [100010 x i32], align 16
  %5 = alloca [100010 x i32], align 16
  %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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca [3 x i32], align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %29 = 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)
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 400040, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 400040, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %73, %0
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

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

36:                                               ; preds = %31
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %38
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %42
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add nsw i32 %48, -1
  store i32 %49, ptr %47, align 4, !tbaa !5
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, -1
  store i32 %54, ptr %52, align 4, !tbaa !5
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %59
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %62
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 4 dereferenceable(4) %63)
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %68
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %71
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 4 dereferenceable(4) %72)
  br label %73

73:                                               ; preds = %36
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %6, align 4, !tbaa !5
  br label %31, !llvm.loop !9

76:                                               ; preds = %35
  %77 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z4initi(i32 noundef %77)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %104, %76
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

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

83:                                               ; preds = %78
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %84, i32 noundef %85)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef @.str.2)
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %87, i32 noundef %91)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %94, i32 noundef %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef @.str.2)
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100010 x i32], ptr @depth, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %97, i32 noundef %101)
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %104

104:                                              ; preds = %83
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %7, align 4, !tbaa !5
  br label %78, !llvm.loop !11

107:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @ans, ptr noundef getelementptr inbounds (i64, ptr @ans, i64 400040), ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %124, %107
  %109 = load i32, ptr %9, align 4, !tbaa !5
  %110 = load i32, ptr %2, align 4, !tbaa !5
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

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

113:                                              ; preds = %108
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100010 x i64], ptr @ans, i64 0, i64 %115
  store i64 1, ptr %116, align 8, !tbaa !12
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %118
  %120 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #7
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([5 x [100010 x i64]], ptr @ans, i64 0, i64 1), i64 0, i64 %122
  store i64 %120, ptr %123, align 8, !tbaa !12
  br label %124

124:                                              ; preds = %113
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %9, align 4, !tbaa !5
  br label %108, !llvm.loop !14

127:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 2, ptr %10, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %242, %127
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = icmp sle i32 %129, 4
  br i1 %130, label %132, label %131

131:                                              ; preds = %128
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %245

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

133:                                              ; preds = %238, %132
  %134 = load i32, ptr %12, align 4, !tbaa !5
  %135 = load i32, ptr %2, align 4, !tbaa !5
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %241

138:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %140
  store ptr %141, ptr %13, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %142 = load ptr, ptr %13, align 8, !tbaa !15
  %143 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %142) #7
  %144 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %143, ptr %144, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %145 = load ptr, ptr %13, align 8, !tbaa !15
  %146 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %145) #7
  %147 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %146, ptr %147, align 8
  br label %148

148:                                              ; preds = %219, %138
  %149 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %149, label %151, label %150

150:                                              ; preds = %148
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %221

151:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %153 = load i32, ptr %152, align 4, !tbaa !5
  store i32 %153, ptr %16, align 4, !tbaa !5
  %154 = load i32, ptr %10, align 4, !tbaa !5
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %156
  %158 = load i32, ptr %16, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [100010 x i64], ptr %157, i64 0, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !12
  %162 = load i32, ptr %10, align 4, !tbaa !5
  %163 = sub nsw i32 %162, 2
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %164
  %166 = load i32, ptr %12, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [100010 x i64], ptr %165, i64 0, i64 %167
  %169 = load i64, ptr %168, align 8, !tbaa !12
  %170 = sub nsw i64 %161, %169
  %171 = load i32, ptr %10, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %172
  %174 = load i32, ptr %12, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [100010 x i64], ptr %173, i64 0, i64 %175
  %177 = load i64, ptr %176, align 8, !tbaa !12
  %178 = add nsw i64 %177, %170
  store i64 %178, ptr %176, align 8, !tbaa !12
  %179 = load i32, ptr %10, align 4, !tbaa !5
  %180 = icmp sge i32 %179, 3
  br i1 %180, label %181, label %198

181:                                              ; preds = %151
  %182 = load i32, ptr %10, align 4, !tbaa !5
  %183 = sub nsw i32 %182, 3
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %184
  %186 = load i32, ptr %16, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [100010 x i64], ptr %185, i64 0, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !12
  %190 = load i32, ptr %10, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %191
  %193 = load i32, ptr %12, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [100010 x i64], ptr %192, i64 0, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !12
  %197 = add nsw i64 %196, %189
  store i64 %197, ptr %195, align 8, !tbaa !12
  br label %198

198:                                              ; preds = %181, %151
  %199 = load i32, ptr %10, align 4, !tbaa !5
  %200 = icmp sge i32 %199, 4
  br i1 %200, label %201, label %218

201:                                              ; preds = %198
  %202 = load i32, ptr %10, align 4, !tbaa !5
  %203 = sub nsw i32 %202, 4
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %204
  %206 = load i32, ptr %12, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [100010 x i64], ptr %205, i64 0, i64 %207
  %209 = load i64, ptr %208, align 8, !tbaa !12
  %210 = load i32, ptr %10, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %211
  %213 = load i32, ptr %12, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [100010 x i64], ptr %212, i64 0, i64 %214
  %216 = load i64, ptr %215, align 8, !tbaa !12
  %217 = sub nsw i64 %216, %209
  store i64 %217, ptr %215, align 8, !tbaa !12
  br label %218

218:                                              ; preds = %201, %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %219

219:                                              ; preds = %218
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %148

221:                                              ; preds = %150
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.4)
  %223 = load i32, ptr %10, align 4, !tbaa !5
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %222, i32 noundef %223)
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %224, ptr noundef @.str.5)
  %226 = load i32, ptr %12, align 4, !tbaa !5
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %225, i32 noundef %226)
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %227, ptr noundef @.str.2)
  %229 = load i32, ptr %10, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %230
  %232 = load i32, ptr %12, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [100010 x i64], ptr %231, i64 0, i64 %233
  %235 = load i64, ptr %234, align 8, !tbaa !12
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %228, i64 noundef %235)
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %236, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %238

238:                                              ; preds = %221
  %239 = load i32, ptr %12, align 4, !tbaa !5
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %12, align 4, !tbaa !5
  br label %133, !llvm.loop !17

241:                                              ; preds = %137
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %10, align 4, !tbaa !5
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %10, align 4, !tbaa !5
  br label %128, !llvm.loop !18

245:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @red, ptr noundef getelementptr inbounds (i64, ptr @red, i64 100010), ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %246

246:                                              ; preds = %474, %245
  %247 = load i32, ptr %18, align 4, !tbaa !5
  %248 = load i32, ptr %3, align 4, !tbaa !5
  %249 = icmp slt i32 %247, %248
  br i1 %249, label %251, label %250

250:                                              ; preds = %246
  store i32 19, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %477

251:                                              ; preds = %246
  %252 = load i32, ptr %18, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %256
  %258 = load i32, ptr %257, align 4, !tbaa !5
  %259 = load i32, ptr %18, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %260
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = icmp eq i32 %258, %262
  br i1 %263, label %277, label %264

264:                                              ; preds = %251
  %265 = load i32, ptr %18, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %266
  %268 = load i32, ptr %267, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %269
  %271 = load i32, ptr %270, align 4, !tbaa !5
  %272 = load i32, ptr %18, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %273
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = icmp eq i32 %271, %275
  br i1 %276, label %277, label %278

277:                                              ; preds = %264, %251
  br label %474

278:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  %279 = load i32, ptr %18, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %280
  %282 = load i32, ptr %281, align 4, !tbaa !5
  %283 = load i32, ptr %18, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %284
  %286 = load i32, ptr %285, align 4, !tbaa !5
  %287 = call noundef i32 @_Z3lcaii(i32 noundef %282, i32 noundef %286)
  %288 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  store i32 %287, ptr %288, align 4, !tbaa !5
  %289 = load i32, ptr %18, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %290
  %292 = load i32, ptr %291, align 4, !tbaa !5
  %293 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 1
  store i32 %292, ptr %293, align 4, !tbaa !5
  %294 = load i32, ptr %18, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %295
  %297 = load i32, ptr %296, align 4, !tbaa !5
  %298 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 2
  store i32 %297, ptr %298, align 4, !tbaa !5
  %299 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.6)
  %300 = load i32, ptr %18, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %301
  %303 = load i32, ptr %302, align 4, !tbaa !5
  %304 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %299, i32 noundef %303)
  %305 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %304, ptr noundef @.str.7)
  %306 = load i32, ptr %18, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %307
  %309 = load i32, ptr %308, align 4, !tbaa !5
  %310 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %305, i32 noundef %309)
  %311 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %310, ptr noundef @.str.8)
  %312 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  %313 = load i32, ptr %312, align 4, !tbaa !5
  %314 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %311, i32 noundef %313)
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %314, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %316 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 1
  %317 = load i32, ptr %316, align 4, !tbaa !5
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [100010 x i32], ptr @depth, i64 0, i64 %318
  %320 = load i32, ptr %319, align 4, !tbaa !5
  %321 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 2
  %322 = load i32, ptr %321, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [100010 x i32], ptr @depth, i64 0, i64 %323
  %325 = load i32, ptr %324, align 4, !tbaa !5
  %326 = add nsw i32 %320, %325
  %327 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  %328 = load i32, ptr %327, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [100010 x i32], ptr @depth, i64 0, i64 %329
  %331 = load i32, ptr %330, align 4, !tbaa !5
  %332 = mul nsw i32 2, %331
  %333 = sub nsw i32 %326, %332
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %20, align 4, !tbaa !5
  %335 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.9)
  %336 = load i32, ptr %20, align 4, !tbaa !5
  %337 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %335, i32 noundef %336)
  %338 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %337, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %339 = load i32, ptr %20, align 4, !tbaa !5
  %340 = icmp eq i32 %339, 3
  br i1 %340, label %341, label %419

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

342:                                              ; preds = %415, %341
  %343 = load i32, ptr %21, align 4, !tbaa !5
  %344 = icmp slt i32 %343, 3
  br i1 %344, label %346, label %345

345:                                              ; preds = %342
  store i32 22, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %418

346:                                              ; preds = %342
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %347 = load i32, ptr %21, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %348
  %350 = load i32, ptr %349, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %351
  store ptr %352, ptr %22, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %353 = load ptr, ptr %22, align 8, !tbaa !15
  %354 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %353) #7
  %355 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %354, ptr %355, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %356 = load ptr, ptr %22, align 8, !tbaa !15
  %357 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %356) #7
  %358 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %357, ptr %358, align 8
  br label %359

359:                                              ; preds = %395, %346
  %360 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  br i1 %360, label %362, label %361

361:                                              ; preds = %359
  store i32 25, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %397

362:                                              ; preds = %359
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %363 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  %364 = load i32, ptr %363, align 4, !tbaa !5
  store i32 %364, ptr %25, align 4, !tbaa !5
  %365 = load i32, ptr %25, align 4, !tbaa !5
  %366 = load i32, ptr %21, align 4, !tbaa !5
  %367 = add nsw i32 %366, 1
  %368 = srem i32 %367, 3
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %369
  %371 = load i32, ptr %370, align 4, !tbaa !5
  %372 = icmp ne i32 %365, %371
  br i1 %372, label %373, label %388

373:                                              ; preds = %362
  %374 = load i32, ptr %25, align 4, !tbaa !5
  %375 = load i32, ptr %21, align 4, !tbaa !5
  %376 = add nsw i32 %375, 2
  %377 = srem i32 %376, 3
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %378
  %380 = load i32, ptr %379, align 4, !tbaa !5
  %381 = icmp ne i32 %374, %380
  br i1 %381, label %382, label %388

382:                                              ; preds = %373
  %383 = load i32, ptr %25, align 4, !tbaa !5
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %384
  %386 = load i64, ptr %385, align 8, !tbaa !12
  %387 = add nsw i64 %386, 2
  store i64 %387, ptr %385, align 8, !tbaa !12
  br label %394

388:                                              ; preds = %373, %362
  %389 = load i32, ptr %25, align 4, !tbaa !5
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %390
  %392 = load i64, ptr %391, align 8, !tbaa !12
  %393 = add nsw i64 %392, 1
  store i64 %393, ptr %391, align 8, !tbaa !12
  br label %394

394:                                              ; preds = %388, %382
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %395

395:                                              ; preds = %394
  %396 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  br label %359

397:                                              ; preds = %361
  %398 = load i32, ptr %21, align 4, !tbaa !5
  %399 = sext i32 %398 to i64
  %400 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %399
  %401 = load i32, ptr %400, align 4, !tbaa !5
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %402
  %404 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %403) #7
  %405 = sub i64 %404, 1
  %406 = mul i64 2, %405
  %407 = load i32, ptr %21, align 4, !tbaa !5
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %408
  %410 = load i32, ptr %409, align 4, !tbaa !5
  %411 = sext i32 %410 to i64
  %412 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %411
  %413 = load i64, ptr %412, align 8, !tbaa !12
  %414 = add i64 %413, %406
  store i64 %414, ptr %412, align 8, !tbaa !12
  br label %415

415:                                              ; preds = %397
  %416 = load i32, ptr %21, align 4, !tbaa !5
  %417 = add nsw i32 %416, 1
  store i32 %417, ptr %21, align 4, !tbaa !5
  br label %342, !llvm.loop !19

418:                                              ; preds = %345
  br label %473

419:                                              ; preds = %278
  %420 = load i32, ptr %20, align 4, !tbaa !5
  %421 = icmp eq i32 %420, 4
  br i1 %421, label %422, label %472

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

423:                                              ; preds = %436, %422
  %424 = load i32, ptr %26, align 4, !tbaa !5
  %425 = icmp slt i32 %424, 3
  br i1 %425, label %427, label %426

426:                                              ; preds = %423
  store i32 27, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %439

427:                                              ; preds = %423
  %428 = load i32, ptr %26, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %429
  %431 = load i32, ptr %430, align 4, !tbaa !5
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %432
  %434 = load i64, ptr %433, align 8, !tbaa !12
  %435 = add nsw i64 %434, 1
  store i64 %435, ptr %433, align 8, !tbaa !12
  br label %436

436:                                              ; preds = %427
  %437 = load i32, ptr %26, align 4, !tbaa !5
  %438 = add nsw i32 %437, 1
  store i32 %438, ptr %26, align 4, !tbaa !5
  br label %423, !llvm.loop !20

439:                                              ; preds = %426
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 1, ptr %27, align 4, !tbaa !5
  br label %440

440:                                              ; preds = %468, %439
  %441 = load i32, ptr %27, align 4, !tbaa !5
  %442 = icmp slt i32 %441, 3
  br i1 %442, label %444, label %443

443:                                              ; preds = %440
  store i32 30, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %471

444:                                              ; preds = %440
  %445 = load i32, ptr %27, align 4, !tbaa !5
  %446 = sext i32 %445 to i64
  %447 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %446
  %448 = load i32, ptr %447, align 4, !tbaa !5
  %449 = sext i32 %448 to i64
  %450 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %449
  %451 = load i32, ptr %450, align 4, !tbaa !5
  %452 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  %453 = load i32, ptr %452, align 4, !tbaa !5
  %454 = icmp ne i32 %451, %453
  br i1 %454, label %455, label %467

455:                                              ; preds = %444
  %456 = load i32, ptr %27, align 4, !tbaa !5
  %457 = sext i32 %456 to i64
  %458 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %457
  %459 = load i32, ptr %458, align 4, !tbaa !5
  %460 = sext i32 %459 to i64
  %461 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %460
  %462 = load i32, ptr %461, align 4, !tbaa !5
  %463 = sext i32 %462 to i64
  %464 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %463
  %465 = load i64, ptr %464, align 8, !tbaa !12
  %466 = add nsw i64 %465, 2
  store i64 %466, ptr %464, align 8, !tbaa !12
  br label %467

467:                                              ; preds = %455, %444
  br label %468

468:                                              ; preds = %467
  %469 = load i32, ptr %27, align 4, !tbaa !5
  %470 = add nsw i32 %469, 1
  store i32 %470, ptr %27, align 4, !tbaa !5
  br label %440, !llvm.loop !21

471:                                              ; preds = %443
  br label %472

472:                                              ; preds = %471, %419
  br label %473

473:                                              ; preds = %472, %418
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  br label %474

474:                                              ; preds = %473, %277
  %475 = load i32, ptr %18, align 4, !tbaa !5
  %476 = add nsw i32 %475, 1
  store i32 %476, ptr %18, align 4, !tbaa !5
  br label %246, !llvm.loop !22

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

478:                                              ; preds = %514, %477
  %479 = load i32, ptr %28, align 4, !tbaa !5
  %480 = load i32, ptr %2, align 4, !tbaa !5
  %481 = icmp slt i32 %479, %480
  br i1 %481, label %483, label %482

482:                                              ; preds = %478
  store i32 33, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %517

483:                                              ; preds = %478
  %484 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.10)
  %485 = load i32, ptr %28, align 4, !tbaa !5
  %486 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %484, i32 noundef %485)
  %487 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %486, ptr noundef @.str.2)
  %488 = load i32, ptr %28, align 4, !tbaa !5
  %489 = sext i32 %488 to i64
  %490 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([5 x [100010 x i64]], ptr @ans, i64 0, i64 4), i64 0, i64 %489
  %491 = load i64, ptr %490, align 8, !tbaa !12
  %492 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %487, i64 noundef %491)
  %493 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %492, ptr noundef @.str.11)
  %494 = load i32, ptr %28, align 4, !tbaa !5
  %495 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %493, i32 noundef %494)
  %496 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %495, ptr noundef @.str.2)
  %497 = load i32, ptr %28, align 4, !tbaa !5
  %498 = sext i32 %497 to i64
  %499 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %498
  %500 = load i64, ptr %499, align 8, !tbaa !12
  %501 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %496, i64 noundef %500)
  %502 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %501, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %503 = load i32, ptr %28, align 4, !tbaa !5
  %504 = sext i32 %503 to i64
  %505 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([5 x [100010 x i64]], ptr @ans, i64 0, i64 4), i64 0, i64 %504
  %506 = load i64, ptr %505, align 8, !tbaa !12
  %507 = load i32, ptr %28, align 4, !tbaa !5
  %508 = sext i32 %507 to i64
  %509 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %508
  %510 = load i64, ptr %509, align 8, !tbaa !12
  %511 = sub nsw i64 %506, %510
  %512 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %511)
  %513 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %512, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %514

514:                                              ; preds = %483
  %515 = load i32, ptr %28, align 4, !tbaa !5
  %516 = add nsw i32 %515, 1
  store i32 %516, ptr %28, align 4, !tbaa !5
  br label %478, !llvm.loop !23

517:                                              ; preds = %482
  call void @llvm.lifetime.end.p0(i64 400040, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 400040, 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
  %518 = load i32, ptr %1, align 4
  ret i32 %518
}

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

; 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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #6

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

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 = { 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 #4 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 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 = !{!"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 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !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::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" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@V = external dso_local global [100010 x %"class.std::vector"], align 16
@parent = external dso_local local_unnamed_addr global [18 x [100010 x i32]], align 16
@depth = external dso_local local_unnamed_addr global [100010 x i32], align 16
@ans = external dso_local global [5 x [100010 x i64]], align 16
@red = external dso_local global [100010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3lcaii(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [100010 x i32], align 16
  %4 = alloca [100010 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %11 = 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)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %4) #7
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %15 = load i32, ptr %1, align 4, !tbaa !5
  call void @_Z4initi(i32 noundef %15)
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph115, label %._crit_edge116

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %18 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %indvars.iv
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %20 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %22 = load i32, ptr %18, align 4, !tbaa !5
  %23 = add nsw i32 %22, -1
  store i32 %23, ptr %18, align 4, !tbaa !5
  %24 = load i32, ptr %20, align 4, !tbaa !5
  %25 = add nsw i32 %24, -1
  store i32 %25, ptr %20, align 4, !tbaa !5
  %26 = sext i32 %23 to i64
  %27 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %26
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %28 = load i32, ptr %20, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %29
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge116:                                   ; preds = %.lr.ph115, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @ans, ptr noundef nonnull getelementptr inbounds (i8, ptr @ans, i64 3200320), ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph119, label %.split.us

.lr.ph115:                                        ; preds = %._crit_edge, %.lr.ph115
  %indvars.iv150 = phi i64 [ %indvars.iv.next151, %.lr.ph115 ], [ 0, %._crit_edge ]
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %37 = trunc nuw nsw i64 %indvars.iv150 to i32
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %36, i32 noundef %37)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str.2)
  %40 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %indvars.iv150
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef %41)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.3)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %44, i32 noundef %37)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str.2)
  %47 = getelementptr inbounds [100010 x i32], ptr @depth, i64 0, i64 %indvars.iv150
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %46, i32 noundef %48)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %indvars.iv.next151, %52
  br i1 %53, label %.lr.ph115, label %._crit_edge116, !llvm.loop !11

.preheader111:                                    ; preds = %.lr.ph119
  %54 = icmp sgt i32 %59, 0
  br i1 %54, label %.preheader110, label %.split.us

.lr.ph119:                                        ; preds = %._crit_edge116, %.lr.ph119
  %indvars.iv153 = phi i64 [ %indvars.iv.next154, %.lr.ph119 ], [ 0, %._crit_edge116 ]
  %55 = getelementptr inbounds [100010 x i64], ptr @ans, i64 0, i64 %indvars.iv153
  store i64 1, ptr %55, align 8, !tbaa !12
  %56 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %indvars.iv153
  %57 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #7
  %58 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds (i8, ptr @ans, i64 800080), i64 0, i64 %indvars.iv153
  store i64 %57, ptr %58, align 8, !tbaa !12
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next154, %60
  br i1 %61, label %.lr.ph119, label %.preheader111, !llvm.loop !14

.preheader110:                                    ; preds = %.preheader111, %._crit_edge126
  %62 = phi i32 [ %122, %._crit_edge126 ], [ %59, %.preheader111 ]
  %indvars.iv162 = phi i64 [ %indvars.iv.next163, %._crit_edge126 ], [ 2, %.preheader111 ]
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %.lr.ph125, label %._crit_edge126

.lr.ph125:                                        ; preds = %.preheader110
  %64 = add nsw i64 %indvars.iv162, -1
  %65 = add nsw i64 %indvars.iv162, -2
  %66 = icmp ugt i64 %indvars.iv162, 2
  %67 = add nsw i64 %indvars.iv162, -3
  %68 = icmp eq i64 %indvars.iv162, 4
  %69 = trunc nuw nsw i64 %indvars.iv162 to i32
  br i1 %66, label %.lr.ph125.split.us, label %.lr.ph125.split

.lr.ph125.split.us:                               ; preds = %.lr.ph125, %._crit_edge122.split.us.us
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %._crit_edge122.split.us.us ], [ 0, %.lr.ph125 ]
  %70 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %indvars.iv159
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %71 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #7
  store ptr %71, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %72 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #7
  store ptr %72, ptr %7, align 8
  %73 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %73, label %.lr.ph121.us, label %._crit_edge122.split.us.us

._crit_edge122.split.us.us:                       ; preds = %.thread.us.us127, %.thread.us.us.us, %.lr.ph125.split.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.4)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %74, i32 noundef %69)
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @.str.5)
  %77 = trunc nuw nsw i64 %indvars.iv159 to i32
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %76, i32 noundef %77)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull @.str.2)
  %80 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %indvars.iv162, i64 %indvars.iv159
  %81 = load i64, ptr %80, align 8, !tbaa !12
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %79, i64 noundef %81)
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %84 = load i32, ptr %1, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = icmp slt i64 %indvars.iv.next160, %85
  br i1 %86, label %.lr.ph125.split.us, label %._crit_edge126, !llvm.loop !15

.lr.ph121.us:                                     ; preds = %.lr.ph125.split.us
  %87 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %65, i64 %indvars.iv159
  %88 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %indvars.iv162, i64 %indvars.iv159
  %89 = getelementptr inbounds [100010 x i64], ptr @ans, i64 0, i64 %indvars.iv159
  br i1 %68, label %.thread.us.us.us, label %.thread.us.us127

.thread.us.us127:                                 ; preds = %.lr.ph121.us, %.thread.us.us127
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %64, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !12
  %95 = load i64, ptr %87, align 8, !tbaa !12
  %96 = sub nsw i64 %94, %95
  %97 = load i64, ptr %88, align 8, !tbaa !12
  %98 = add nsw i64 %97, %96
  store i64 %98, ptr %88, align 8, !tbaa !12
  %99 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %67, i64 %92
  %100 = load i64, ptr %99, align 8, !tbaa !12
  %101 = add nsw i64 %100, %98
  store i64 %101, ptr %88, align 8, !tbaa !12
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %103 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %103, label %.thread.us.us127, label %._crit_edge122.split.us.us

.thread.us.us.us:                                 ; preds = %.lr.ph121.us, %.thread.us.us.us
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %64, i64 %106
  %108 = load i64, ptr %107, align 8, !tbaa !12
  %109 = load i64, ptr %87, align 8, !tbaa !12
  %110 = sub nsw i64 %108, %109
  %111 = load i64, ptr %88, align 8, !tbaa !12
  %112 = add nsw i64 %111, %110
  store i64 %112, ptr %88, align 8, !tbaa !12
  %113 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %67, i64 %106
  %114 = load i64, ptr %113, align 8, !tbaa !12
  %115 = add nsw i64 %114, %112
  %116 = load i64, ptr %89, align 8, !tbaa !12
  %117 = sub nsw i64 %115, %116
  store i64 %117, ptr %88, align 8, !tbaa !12
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %119 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %119, label %.thread.us.us.us, label %._crit_edge122.split.us.us

.split.us:                                        ; preds = %._crit_edge126, %._crit_edge116, %.preheader111
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @red, ptr noundef nonnull getelementptr inbounds (i8, ptr @red, i64 800080), ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  %120 = load i32, ptr %2, align 4, !tbaa !5
  %121 = icmp sgt i32 %120, 0
  br i1 %121, label %.lr.ph140, label %.preheader

._crit_edge126:                                   ; preds = %._crit_edge122.split, %._crit_edge122.split.us.us, %.preheader110
  %122 = phi i32 [ %62, %.preheader110 ], [ %84, %._crit_edge122.split.us.us ], [ %139, %._crit_edge122.split ]
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next163, 5
  br i1 %exitcond.not, label %.split.us, label %.preheader110, !llvm.loop !16

.lr.ph125.split:                                  ; preds = %.lr.ph125, %._crit_edge122.split
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %._crit_edge122.split ], [ 0, %.lr.ph125 ]
  %123 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %indvars.iv156
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %124 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %123) #7
  store ptr %124, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %125 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %123) #7
  store ptr %125, ptr %7, align 8
  %126 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %126, label %.lr.ph121, label %._crit_edge122.split

.lr.ph121:                                        ; preds = %.lr.ph125.split
  %127 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %65, i64 %indvars.iv156
  %128 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %indvars.iv162, i64 %indvars.iv156
  br label %.thread

._crit_edge122.split:                             ; preds = %.thread, %.lr.ph125.split
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.4)
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %129, i32 noundef %69)
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @.str.5)
  %132 = trunc nuw nsw i64 %indvars.iv156 to i32
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %131, i32 noundef %132)
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull @.str.2)
  %135 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %indvars.iv162, i64 %indvars.iv156
  %136 = load i64, ptr %135, align 8, !tbaa !12
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %134, i64 noundef %136)
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %139 = load i32, ptr %1, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = icmp slt i64 %indvars.iv.next157, %140
  br i1 %141, label %.lr.ph125.split, label %._crit_edge126, !llvm.loop !15

.thread:                                          ; preds = %.lr.ph121, %.thread
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [5 x [100010 x i64]], ptr @ans, i64 0, i64 %64, i64 %144
  %146 = load i64, ptr %145, align 8, !tbaa !12
  %147 = load i64, ptr %127, align 8, !tbaa !12
  %148 = sub nsw i64 %146, %147
  %149 = load i64, ptr %128, align 8, !tbaa !12
  %150 = add nsw i64 %149, %148
  store i64 %150, ptr %128, align 8, !tbaa !12
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %152 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %152, label %.thread, label %._crit_edge122.split

.preheader:                                       ; preds = %275, %.split.us
  %153 = load i32, ptr %1, align 4, !tbaa !5
  %154 = icmp sgt i32 %153, 0
  br i1 %154, label %.lr.ph142, label %._crit_edge143

.lr.ph140:                                        ; preds = %.split.us, %275
  %155 = phi i32 [ %276, %275 ], [ %120, %.split.us ]
  %indvars.iv177 = phi i64 [ %indvars.iv.next178, %275 ], [ 0, %.split.us ]
  %156 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %indvars.iv177
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv177
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = icmp eq i32 %160, %162
  br i1 %163, label %275, label %164

164:                                              ; preds = %.lr.ph140
  %165 = sext i32 %162 to i64
  %166 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = icmp eq i32 %167, %157
  br i1 %168, label %275, label %169

169:                                              ; preds = %164
  %170 = call noundef i32 @_Z3lcaii(i32 noundef %157, i32 noundef %162)
  %171 = load i32, ptr %156, align 4, !tbaa !5
  %172 = load i32, ptr %161, align 4, !tbaa !5
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.6)
  %174 = load i32, ptr %156, align 4, !tbaa !5
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %173, i32 noundef %174)
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef nonnull @.str.7)
  %177 = load i32, ptr %161, align 4, !tbaa !5
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %176, i32 noundef %177)
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %178, ptr noundef nonnull @.str.8)
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %179, i32 noundef %170)
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %180, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %182 = sext i32 %171 to i64
  %183 = getelementptr inbounds [100010 x i32], ptr @depth, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = sext i32 %172 to i64
  %186 = getelementptr inbounds [100010 x i32], ptr @depth, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = add nsw i32 %187, %184
  %189 = sext i32 %170 to i64
  %190 = getelementptr inbounds [100010 x i32], ptr @depth, i64 0, i64 %189
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = shl i32 %191, 1
  %193 = sub i32 %188, %192
  %194 = add nsw i32 %193, 1
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.9)
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %195, i32 noundef %194)
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  switch i32 %193, label %.loopexit [
    i32 2, label %.preheader106.preheader
    i32 3, label %.preheader109.preheader
  ]

.preheader109.preheader:                          ; preds = %169
  %198 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %189
  %199 = load i64, ptr %198, align 8, !tbaa !12
  %200 = add nsw i64 %199, 1
  store i64 %200, ptr %198, align 8, !tbaa !12
  %201 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %182
  %202 = load i64, ptr %201, align 8, !tbaa !12
  %203 = add nsw i64 %202, 1
  store i64 %203, ptr %201, align 8, !tbaa !12
  %204 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %185
  %205 = load i64, ptr %204, align 8, !tbaa !12
  %206 = add nsw i64 %205, 1
  store i64 %206, ptr %204, align 8, !tbaa !12
  %207 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %182
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %.not = icmp eq i32 %208, %170
  br i1 %.not, label %.preheader107.1, label %263

.preheader106.preheader:                          ; preds = %169
  %209 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %189
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %210 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %209) #7
  store ptr %210, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %211 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %209) #7
  store ptr %211, ptr %10, align 8
  %212 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %212, label %.lr.ph135, label %._crit_edge136

._crit_edge136:                                   ; preds = %.lr.ph135, %.preheader106.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %213 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %209) #7
  %214 = shl i64 %213, 1
  %215 = add i64 %214, -2
  %216 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %189
  %217 = load i64, ptr %216, align 8, !tbaa !12
  %218 = add i64 %215, %217
  store i64 %218, ptr %216, align 8, !tbaa !12
  %219 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %182
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %220 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %219) #7
  store ptr %220, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %221 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %219) #7
  store ptr %221, ptr %10, align 8
  %222 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %222, label %.lr.ph135.1, label %._crit_edge136.1

.lr.ph135.1:                                      ; preds = %._crit_edge136, %.lr.ph135.1
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %.not104.1 = icmp eq i32 %224, %172
  %.not105.1 = icmp eq i32 %224, %170
  %or.cond = or i1 %.not104.1, %.not105.1
  %. = select i1 %or.cond, i64 1, i64 2
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %225
  %227 = load i64, ptr %226, align 8, !tbaa !12
  %228 = add nsw i64 %227, %.
  store i64 %228, ptr %226, align 8, !tbaa !12
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %230 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %230, label %.lr.ph135.1, label %._crit_edge136.1

._crit_edge136.1:                                 ; preds = %.lr.ph135.1, %._crit_edge136
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %231 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %219) #7
  %232 = shl i64 %231, 1
  %233 = add i64 %232, -2
  %234 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %182
  %235 = load i64, ptr %234, align 8, !tbaa !12
  %236 = add i64 %233, %235
  store i64 %236, ptr %234, align 8, !tbaa !12
  %237 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %185
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %238 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %237) #7
  store ptr %238, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %239 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %237) #7
  store ptr %239, ptr %10, align 8
  %240 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %240, label %.lr.ph135.2, label %._crit_edge136.2

.lr.ph135.2:                                      ; preds = %._crit_edge136.1, %.lr.ph135.2
  %241 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %.not104.2 = icmp eq i32 %242, %170
  %.not105.2 = icmp eq i32 %242, %171
  %or.cond202 = select i1 %.not104.2, i1 true, i1 %.not105.2
  %.212 = select i1 %or.cond202, i64 1, i64 2
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %243
  %245 = load i64, ptr %244, align 8, !tbaa !12
  %246 = add nsw i64 %245, %.212
  store i64 %246, ptr %244, align 8, !tbaa !12
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %248 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %248, label %.lr.ph135.2, label %._crit_edge136.2

._crit_edge136.2:                                 ; preds = %.lr.ph135.2, %._crit_edge136.1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %249 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %237) #7
  %250 = shl i64 %249, 1
  %251 = add i64 %250, -2
  %252 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %185
  %253 = load i64, ptr %252, align 8, !tbaa !12
  %254 = add i64 %251, %253
  store i64 %254, ptr %252, align 8, !tbaa !12
  br label %.loopexit

.lr.ph135:                                        ; preds = %.preheader106.preheader, %.lr.ph135
  %255 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %.not104 = icmp eq i32 %256, %171
  %.not105 = icmp eq i32 %256, %172
  %or.cond207 = select i1 %.not104, i1 true, i1 %.not105
  %.213 = select i1 %or.cond207, i64 1, i64 2
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %257
  %259 = load i64, ptr %258, align 8, !tbaa !12
  %260 = add nsw i64 %259, %.213
  store i64 %260, ptr %258, align 8, !tbaa !12
  %261 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %262 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %262, label %.lr.ph135, label %._crit_edge136

263:                                              ; preds = %.preheader109.preheader
  %264 = sext i32 %208 to i64
  %265 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %264
  %266 = load i64, ptr %265, align 8, !tbaa !12
  %267 = add nsw i64 %266, 2
  store i64 %267, ptr %265, align 8, !tbaa !12
  br label %.preheader107.1

.preheader107.1:                                  ; preds = %.preheader109.preheader, %263
  %268 = getelementptr inbounds [100010 x i32], ptr @parent, i64 0, i64 %185
  %269 = load i32, ptr %268, align 4, !tbaa !5
  %.not.1 = icmp eq i32 %269, %170
  br i1 %.not.1, label %.loopexit, label %270

270:                                              ; preds = %.preheader107.1
  %271 = sext i32 %269 to i64
  %272 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %271
  %273 = load i64, ptr %272, align 8, !tbaa !12
  %274 = add nsw i64 %273, 2
  store i64 %274, ptr %272, align 8, !tbaa !12
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader107.1, %270, %._crit_edge136.2, %169
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %275

275:                                              ; preds = %.lr.ph140, %164, %.loopexit
  %276 = phi i32 [ %155, %.lr.ph140 ], [ %155, %164 ], [ %.pre, %.loopexit ]
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %277 = sext i32 %276 to i64
  %278 = icmp slt i64 %indvars.iv.next178, %277
  br i1 %278, label %.lr.ph140, label %.preheader, !llvm.loop !18

._crit_edge143:                                   ; preds = %.lr.ph142, %.preheader
  call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 400040, 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.ph142:                                        ; preds = %.preheader, %.lr.ph142
  %indvars.iv180 = phi i64 [ %indvars.iv.next181, %.lr.ph142 ], [ 0, %.preheader ]
  %279 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.10)
  %280 = trunc nuw nsw i64 %indvars.iv180 to i32
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %279, i32 noundef %280)
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %281, ptr noundef nonnull @.str.2)
  %283 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds (i8, ptr @ans, i64 3200320), i64 0, i64 %indvars.iv180
  %284 = load i64, ptr %283, align 8, !tbaa !12
  %285 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %282, i64 noundef %284)
  %286 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %285, ptr noundef nonnull @.str.11)
  %287 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %286, i32 noundef %280)
  %288 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %287, ptr noundef nonnull @.str.2)
  %289 = getelementptr inbounds [100010 x i64], ptr @red, i64 0, i64 %indvars.iv180
  %290 = load i64, ptr %289, align 8, !tbaa !12
  %291 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %288, i64 noundef %290)
  %292 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %291, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %293 = load i64, ptr %283, align 8, !tbaa !12
  %294 = load i64, ptr %289, align 8, !tbaa !12
  %295 = sub nsw i64 %293, %294
  %296 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %295)
  %297 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %296, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %298 = load i32, ptr %1, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = icmp slt i64 %indvars.iv.next181, %299
  br i1 %300, label %.lr.ph142, label %._crit_edge143, !llvm.loop !19
}

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

; 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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

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 = { 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 #4 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 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 = !{!"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 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !17}
!17 = !{!"llvm.loop.unswitch.partial.disable"}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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