; LLVM IR from eyangch/competitive-programming :: Codeforces/1527 (d)

; 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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_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 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@de = external dso_local global [200000 x i64], align 16
@su = external dso_local global [200000 x i64], align 16
@ans = external dso_local global [200001 x i64], align 16
@up = external dso_local global [20 x [200000 x i64]], align 16
@l = external dso_local global [200000 x i64], align 16
@r = external dso_local global [200000 x i64], align 16
@c0 = external dso_local global [200000 x i64], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dfsxxxx(i64 noundef, i64 noundef, i64 noundef, i64 noundef) #1

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_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 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef, i64 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3lcaxx(i64 noundef, i64 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca ptr, align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  %40 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %41 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %42 = getelementptr i8, ptr %41, i64 -24
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %43
  %45 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %44, ptr noundef null)
  %46 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %48

48:                                               ; preds = %531, %177, %0
  %49 = load i64, ptr @T, align 8, !tbaa !8
  %50 = add nsw i64 %49, -1
  store i64 %50, ptr @T, align 8, !tbaa !8
  %51 = icmp ne i64 %49, 0
  br i1 %51, label %52, label %533

52:                                               ; preds = %48
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %54

54:                                               ; preds = %62, %52
  %55 = load i64, ptr %2, align 8, !tbaa !8
  %56 = load i64, ptr @N, align 8, !tbaa !8
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %65

59:                                               ; preds = %54
  %60 = load i64, ptr %2, align 8, !tbaa !8
  %61 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %60
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #7
  br label %62

62:                                               ; preds = %59
  %63 = load i64, ptr %2, align 8, !tbaa !8
  %64 = add nsw i64 %63, 1
  store i64 %64, ptr %2, align 8, !tbaa !8
  br label %54, !llvm.loop !11

65:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %66

66:                                               ; preds = %79, %65
  %67 = load i64, ptr %3, align 8, !tbaa !8
  %68 = load i64, ptr @N, align 8, !tbaa !8
  %69 = sub nsw i64 %68, 1
  %70 = icmp slt i64 %67, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %82

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %75 = load i64, ptr %4, align 8, !tbaa !8
  %76 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %75
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %76, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %77 = load i64, ptr %5, align 8, !tbaa !8
  %78 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %77
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %78, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %79

79:                                               ; preds = %72
  %80 = load i64, ptr %3, align 8, !tbaa !8
  %81 = add nsw i64 %80, 1
  store i64 %81, ptr %3, align 8, !tbaa !8
  br label %66, !llvm.loop !13

82:                                               ; preds = %71
  store i64 0, ptr @up, align 16, !tbaa !8
  %83 = call noundef i64 @_Z3dfsxxxx(i64 noundef 0, i64 noundef -1, i64 noundef 0, i64 noundef 0)
  %84 = load i64, ptr @N, align 8, !tbaa !8
  %85 = getelementptr inbounds i64, ptr @ans, i64 %84
  %86 = getelementptr inbounds i64, ptr %85, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !14
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @ans, ptr noundef %86, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr @graph, ptr %7, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %87 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %89 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  br label %91

91:                                               ; preds = %108, %82
  %92 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br i1 %92, label %94, label %93

93:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %110

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %96 = load i64, ptr %95, align 8, !tbaa !8
  store i64 %96, ptr %10, align 8, !tbaa !8
  %97 = load i64, ptr %10, align 8, !tbaa !8
  %98 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = load i64, ptr %10, align 8, !tbaa !8
  %101 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !8
  %103 = sub nsw i64 %102, 1
  %104 = mul nsw i64 %99, %103
  %105 = sdiv i64 %104, 2
  %106 = load i64, ptr @ans, align 16, !tbaa !8
  %107 = add nsw i64 %106, %105
  store i64 %107, ptr @ans, align 16, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %108

108:                                              ; preds = %94
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %91

110:                                              ; preds = %93
  %111 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  %112 = icmp eq i64 %111, 1
  br i1 %112, label %113, label %179

113:                                              ; preds = %110
  %114 = load i64, ptr @su, align 16, !tbaa !8
  %115 = load i64, ptr getelementptr inbounds ([200000 x i64], ptr @su, i64 0, i64 1), align 8, !tbaa !8
  %116 = sub nsw i64 %114, %115
  %117 = sub nsw i64 %116, 1
  store i64 %117, ptr getelementptr inbounds ([200001 x i64], ptr @ans, i64 0, i64 1), align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 1, ptr %11, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 2, ptr %12, align 8, !tbaa !8
  br label %118

118:                                              ; preds = %157, %113
  %119 = load i64, ptr %12, align 8, !tbaa !8
  %120 = load i64, ptr @N, align 8, !tbaa !8
  %121 = icmp sle i64 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 12, ptr %13, align 4
  br label %160

123:                                              ; preds = %118
  %124 = load i64, ptr %12, align 8, !tbaa !8
  %125 = load i64, ptr %11, align 8, !tbaa !8
  %126 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %124, i64 noundef %125)
  br i1 %126, label %127, label %131

127:                                              ; preds = %123
  %128 = load i64, ptr %12, align 8, !tbaa !8
  %129 = load i64, ptr @N, align 8, !tbaa !8
  %130 = icmp eq i64 %128, %129
  br i1 %130, label %131, label %137

131:                                              ; preds = %127, %123
  %132 = load i64, ptr %11, align 8, !tbaa !8
  %133 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !8
  %135 = load i64, ptr %12, align 8, !tbaa !8
  %136 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %135
  store i64 %134, ptr %136, align 8, !tbaa !8
  store i32 12, ptr %13, align 4
  br label %160

137:                                              ; preds = %127
  %138 = load i64, ptr %12, align 8, !tbaa !8
  %139 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !8
  %141 = load i64, ptr %11, align 8, !tbaa !8
  %142 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !8
  %144 = icmp sgt i64 %140, %143
  br i1 %144, label %145, label %156

145:                                              ; preds = %137
  %146 = load i64, ptr %11, align 8, !tbaa !8
  %147 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !8
  %149 = load i64, ptr %12, align 8, !tbaa !8
  %150 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !8
  %152 = sub nsw i64 %148, %151
  %153 = load i64, ptr %12, align 8, !tbaa !8
  %154 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %153
  store i64 %152, ptr %154, align 8, !tbaa !8
  %155 = load i64, ptr %12, align 8, !tbaa !8
  store i64 %155, ptr %11, align 8, !tbaa !8
  br label %156

156:                                              ; preds = %145, %137
  br label %157

157:                                              ; preds = %156
  %158 = load i64, ptr %12, align 8, !tbaa !8
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %12, align 8, !tbaa !8
  br label %118, !llvm.loop !18

160:                                              ; preds = %131, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %161

161:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !8
  br label %162

162:                                              ; preds = %174, %161
  %163 = load i64, ptr %14, align 8, !tbaa !8
  %164 = load i64, ptr @N, align 8, !tbaa !8
  %165 = add nsw i64 %164, 1
  %166 = icmp slt i64 %163, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %162
  store i32 15, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %177

168:                                              ; preds = %162
  %169 = load i64, ptr %14, align 8, !tbaa !8
  %170 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !8
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %171)
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef @.str)
  br label %174

174:                                              ; preds = %168
  %175 = load i64, ptr %14, align 8, !tbaa !8
  %176 = add nsw i64 %175, 1
  store i64 %176, ptr %14, align 8, !tbaa !8
  br label %162, !llvm.loop !19

177:                                              ; preds = %167
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %48

179:                                              ; preds = %110
  %180 = load i64, ptr @N, align 8, !tbaa !8
  %181 = getelementptr inbounds i64, ptr @l, i64 %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 -1, ptr %15, align 4, !tbaa !14
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @l, ptr noundef %181, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  %182 = load i64, ptr @N, align 8, !tbaa !8
  %183 = getelementptr inbounds i64, ptr @r, i64 %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 -1, ptr %16, align 4, !tbaa !14
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @r, ptr noundef %183, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  store i64 0, ptr @r, align 16, !tbaa !8
  store i64 0, ptr @l, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 1, ptr %17, align 8, !tbaa !8
  br label %184

184:                                              ; preds = %278, %179
  %185 = load i64, ptr %17, align 8, !tbaa !8
  %186 = load i64, ptr @N, align 8, !tbaa !8
  %187 = icmp slt i64 %185, %186
  br i1 %187, label %189, label %188

188:                                              ; preds = %184
  store i32 18, ptr %13, align 4
  br label %281

189:                                              ; preds = %184
  %190 = load i64, ptr %17, align 8, !tbaa !8
  %191 = sub nsw i64 %190, 1
  %192 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %191
  %193 = load i64, ptr %192, align 8, !tbaa !8
  %194 = load i64, ptr %17, align 8, !tbaa !8
  %195 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %193, i64 noundef %194)
  br i1 %195, label %196, label %232

196:                                              ; preds = %189
  %197 = load i64, ptr %17, align 8, !tbaa !8
  %198 = sub nsw i64 %197, 1
  %199 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !8
  %201 = load i64, ptr %17, align 8, !tbaa !8
  %202 = call noundef i64 @_Z3lcaxx(i64 noundef %200, i64 noundef %201)
  %203 = icmp eq i64 %202, 0
  br i1 %203, label %204, label %232

204:                                              ; preds = %196
  %205 = load i64, ptr %17, align 8, !tbaa !8
  %206 = sub nsw i64 %205, 1
  %207 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !8
  %209 = load i64, ptr %17, align 8, !tbaa !8
  %210 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %209
  store i64 %208, ptr %210, align 8, !tbaa !8
  %211 = load i64, ptr %17, align 8, !tbaa !8
  %212 = sub nsw i64 %211, 1
  %213 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %212
  %214 = load i64, ptr %213, align 8, !tbaa !8
  %215 = load i64, ptr %17, align 8, !tbaa !8
  %216 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %215
  store i64 %214, ptr %216, align 8, !tbaa !8
  %217 = load i64, ptr %17, align 8, !tbaa !8
  %218 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %217
  %219 = load i64, ptr %218, align 8, !tbaa !8
  %220 = load i64, ptr %17, align 8, !tbaa !8
  %221 = sub nsw i64 %220, 1
  %222 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %221
  %223 = load i64, ptr %222, align 8, !tbaa !8
  %224 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !8
  %226 = icmp sgt i64 %219, %225
  br i1 %226, label %227, label %231

227:                                              ; preds = %204
  %228 = load i64, ptr %17, align 8, !tbaa !8
  %229 = load i64, ptr %17, align 8, !tbaa !8
  %230 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %229
  store i64 %228, ptr %230, align 8, !tbaa !8
  br label %231

231:                                              ; preds = %227, %204
  br label %277

232:                                              ; preds = %196, %189
  %233 = load i64, ptr %17, align 8, !tbaa !8
  %234 = sub nsw i64 %233, 1
  %235 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %234
  %236 = load i64, ptr %235, align 8, !tbaa !8
  %237 = load i64, ptr %17, align 8, !tbaa !8
  %238 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %236, i64 noundef %237)
  br i1 %238, label %239, label %275

239:                                              ; preds = %232
  %240 = load i64, ptr %17, align 8, !tbaa !8
  %241 = sub nsw i64 %240, 1
  %242 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %241
  %243 = load i64, ptr %242, align 8, !tbaa !8
  %244 = load i64, ptr %17, align 8, !tbaa !8
  %245 = call noundef i64 @_Z3lcaxx(i64 noundef %243, i64 noundef %244)
  %246 = icmp eq i64 %245, 0
  br i1 %246, label %247, label %275

247:                                              ; preds = %239
  %248 = load i64, ptr %17, align 8, !tbaa !8
  %249 = sub nsw i64 %248, 1
  %250 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %249
  %251 = load i64, ptr %250, align 8, !tbaa !8
  %252 = load i64, ptr %17, align 8, !tbaa !8
  %253 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %252
  store i64 %251, ptr %253, align 8, !tbaa !8
  %254 = load i64, ptr %17, align 8, !tbaa !8
  %255 = sub nsw i64 %254, 1
  %256 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %255
  %257 = load i64, ptr %256, align 8, !tbaa !8
  %258 = load i64, ptr %17, align 8, !tbaa !8
  %259 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %258
  store i64 %257, ptr %259, align 8, !tbaa !8
  %260 = load i64, ptr %17, align 8, !tbaa !8
  %261 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !8
  %263 = load i64, ptr %17, align 8, !tbaa !8
  %264 = sub nsw i64 %263, 1
  %265 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %264
  %266 = load i64, ptr %265, align 8, !tbaa !8
  %267 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %266
  %268 = load i64, ptr %267, align 8, !tbaa !8
  %269 = icmp sgt i64 %262, %268
  br i1 %269, label %270, label %274

270:                                              ; preds = %247
  %271 = load i64, ptr %17, align 8, !tbaa !8
  %272 = load i64, ptr %17, align 8, !tbaa !8
  %273 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %272
  store i64 %271, ptr %273, align 8, !tbaa !8
  br label %274

274:                                              ; preds = %270, %247
  br label %276

275:                                              ; preds = %239, %232
  store i32 18, ptr %13, align 4
  br label %281

276:                                              ; preds = %274
  br label %277

277:                                              ; preds = %276, %231
  br label %278

278:                                              ; preds = %277
  %279 = load i64, ptr %17, align 8, !tbaa !8
  %280 = add nsw i64 %279, 1
  store i64 %280, ptr %17, align 8, !tbaa !8
  br label %184, !llvm.loop !20

281:                                              ; preds = %275, %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %282

282:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store i64 0, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr @graph, ptr %20, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %283 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  %284 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %283, ptr %284, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %285 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  %286 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %285, ptr %286, align 8
  br label %287

287:                                              ; preds = %315, %282
  %288 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  br i1 %288, label %290, label %289

289:                                              ; preds = %287
  store i32 21, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %318

290:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %291 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %292 = load i64, ptr %291, align 8, !tbaa !8
  store i64 %292, ptr %23, align 8, !tbaa !8
  %293 = load i64, ptr %23, align 8, !tbaa !8
  %294 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %293, i64 noundef 1)
  br i1 %294, label %295, label %306

295:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %296 = load i64, ptr %23, align 8, !tbaa !8
  %297 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %296
  %298 = load i64, ptr %297, align 8, !tbaa !8
  %299 = load i64, ptr getelementptr inbounds ([200000 x i64], ptr @su, i64 0, i64 1), align 8, !tbaa !8
  %300 = sub nsw i64 %298, %299
  store i64 %300, ptr %24, align 8, !tbaa !8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %301 unwind label %302

301:                                              ; preds = %295
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %314

302:                                              ; preds = %295
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %25, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %317

306:                                              ; preds = %290
  %307 = load i64, ptr %23, align 8, !tbaa !8
  %308 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %307
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(8) %308)
          to label %309 unwind label %310

309:                                              ; preds = %306
  br label %314

310:                                              ; preds = %306
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %25, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %26, align 4
  br label %317

314:                                              ; preds = %309, %301
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %315

315:                                              ; preds = %314
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  br label %287

317:                                              ; preds = %310, %302
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %532

318:                                              ; preds = %289
  %319 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  %320 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %319, ptr %320, align 8
  %321 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  %322 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %321, ptr %322, align 8
  %323 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  %324 = load ptr, ptr %323, align 8
  %325 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  %326 = load ptr, ptr %325, align 8
  %327 = invoke noundef i32 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEiET0_T_S8_S7_(ptr %324, ptr %326, i32 noundef 1)
          to label %328 unwind label %339

328:                                              ; preds = %318
  %329 = sext i32 %327 to i64
  store i64 %329, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  store ptr %18, ptr %29, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %330 = load ptr, ptr %29, align 8, !tbaa !16
  %331 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %330) #7
  %332 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %331, ptr %332, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %333 = load ptr, ptr %29, align 8, !tbaa !16
  %334 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %333) #7
  %335 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %334, ptr %335, align 8
  br label %336

336:                                              ; preds = %354, %328
  %337 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #7
  br i1 %337, label %343, label %338

338:                                              ; preds = %336
  store i32 23, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %356

339:                                              ; preds = %529, %318
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %25, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %26, align 4
  br label %532

343:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %344 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  %345 = load i64, ptr %344, align 8, !tbaa !8
  store i64 %345, ptr %32, align 8, !tbaa !8
  %346 = load i64, ptr %32, align 8, !tbaa !8
  %347 = load i64, ptr %19, align 8, !tbaa !8
  %348 = sub nsw i64 %347, %346
  store i64 %348, ptr %19, align 8, !tbaa !8
  %349 = load i64, ptr %32, align 8, !tbaa !8
  %350 = load i64, ptr %19, align 8, !tbaa !8
  %351 = mul nsw i64 %349, %350
  %352 = load i64, ptr getelementptr inbounds ([200001 x i64], ptr @ans, i64 0, i64 1), align 8, !tbaa !8
  %353 = add nsw i64 %352, %351
  store i64 %353, ptr getelementptr inbounds ([200001 x i64], ptr @ans, i64 0, i64 1), align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %354

354:                                              ; preds = %343
  %355 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  br label %336

356:                                              ; preds = %338
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  store i64 2, ptr %33, align 8, !tbaa !8
  br label %357

357:                                              ; preds = %503, %356
  %358 = load i64, ptr %33, align 8, !tbaa !8
  %359 = load i64, ptr @N, align 8, !tbaa !8
  %360 = icmp sle i64 %358, %359
  br i1 %360, label %362, label %361

361:                                              ; preds = %357
  store i32 25, ptr %13, align 4
  br label %506

362:                                              ; preds = %357
  %363 = load i64, ptr %33, align 8, !tbaa !8
  %364 = load i64, ptr @N, align 8, !tbaa !8
  %365 = icmp eq i64 %363, %364
  br i1 %365, label %371, label %366

366:                                              ; preds = %362
  %367 = load i64, ptr %33, align 8, !tbaa !8
  %368 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %367
  %369 = load i64, ptr %368, align 8, !tbaa !8
  %370 = icmp eq i64 %369, -1
  br i1 %370, label %371, label %405

371:                                              ; preds = %366, %362
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %372 = load i64, ptr %33, align 8, !tbaa !8
  %373 = sub nsw i64 %372, 1
  %374 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %373
  %375 = load i64, ptr %374, align 8, !tbaa !8
  %376 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %375
  %377 = load i64, ptr %376, align 8, !tbaa !8
  store i64 %377, ptr %34, align 8, !tbaa !8
  %378 = load i64, ptr %33, align 8, !tbaa !8
  %379 = sub nsw i64 %378, 1
  %380 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %379
  %381 = load i64, ptr %380, align 8, !tbaa !8
  %382 = icmp eq i64 %381, 0
  br i1 %382, label %383, label %394

383:                                              ; preds = %371
  %384 = load i64, ptr @su, align 16, !tbaa !8
  %385 = load i64, ptr %33, align 8, !tbaa !8
  %386 = sub nsw i64 %385, 1
  %387 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %386
  %388 = load i64, ptr %387, align 8, !tbaa !8
  %389 = getelementptr inbounds [200000 x i64], ptr @c0, i64 0, i64 %388
  %390 = load i64, ptr %389, align 8, !tbaa !8
  %391 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %390
  %392 = load i64, ptr %391, align 8, !tbaa !8
  %393 = sub nsw i64 %384, %392
  store i64 %393, ptr %34, align 8, !tbaa !8
  br label %394

394:                                              ; preds = %383, %371
  %395 = load i64, ptr %33, align 8, !tbaa !8
  %396 = sub nsw i64 %395, 1
  %397 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %396
  %398 = load i64, ptr %397, align 8, !tbaa !8
  %399 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %398
  %400 = load i64, ptr %399, align 8, !tbaa !8
  %401 = load i64, ptr %34, align 8, !tbaa !8
  %402 = mul nsw i64 %400, %401
  %403 = load i64, ptr %33, align 8, !tbaa !8
  %404 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %403
  store i64 %402, ptr %404, align 8, !tbaa !8
  store i32 25, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %506

405:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  store i64 0, ptr %35, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  store i64 0, ptr %36, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  store i64 0, ptr %37, align 8, !tbaa !8
  %406 = load i64, ptr %33, align 8, !tbaa !8
  %407 = sub nsw i64 %406, 1
  %408 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %407
  %409 = load i64, ptr %408, align 8, !tbaa !8
  %410 = load i64, ptr %33, align 8, !tbaa !8
  %411 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %410
  %412 = load i64, ptr %411, align 8, !tbaa !8
  %413 = icmp ne i64 %409, %412
  br i1 %413, label %414, label %425

414:                                              ; preds = %405
  %415 = load i64, ptr %33, align 8, !tbaa !8
  %416 = sub nsw i64 %415, 1
  %417 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %416
  %418 = load i64, ptr %417, align 8, !tbaa !8
  store i64 %418, ptr %35, align 8, !tbaa !8
  %419 = load i64, ptr %33, align 8, !tbaa !8
  %420 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %419
  %421 = load i64, ptr %420, align 8, !tbaa !8
  store i64 %421, ptr %36, align 8, !tbaa !8
  %422 = load i64, ptr %33, align 8, !tbaa !8
  %423 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %422
  %424 = load i64, ptr %423, align 8, !tbaa !8
  store i64 %424, ptr %37, align 8, !tbaa !8
  br label %425

425:                                              ; preds = %414, %405
  %426 = load i64, ptr %33, align 8, !tbaa !8
  %427 = sub nsw i64 %426, 1
  %428 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %427
  %429 = load i64, ptr %428, align 8, !tbaa !8
  %430 = load i64, ptr %33, align 8, !tbaa !8
  %431 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %430
  %432 = load i64, ptr %431, align 8, !tbaa !8
  %433 = icmp ne i64 %429, %432
  br i1 %433, label %434, label %445

434:                                              ; preds = %425
  %435 = load i64, ptr %33, align 8, !tbaa !8
  %436 = sub nsw i64 %435, 1
  %437 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %436
  %438 = load i64, ptr %437, align 8, !tbaa !8
  store i64 %438, ptr %35, align 8, !tbaa !8
  %439 = load i64, ptr %33, align 8, !tbaa !8
  %440 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %439
  %441 = load i64, ptr %440, align 8, !tbaa !8
  store i64 %441, ptr %36, align 8, !tbaa !8
  %442 = load i64, ptr %33, align 8, !tbaa !8
  %443 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %442
  %444 = load i64, ptr %443, align 8, !tbaa !8
  store i64 %444, ptr %37, align 8, !tbaa !8
  br label %445

445:                                              ; preds = %434, %425
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %446 = load i64, ptr %37, align 8, !tbaa !8
  %447 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %446
  %448 = load i64, ptr %447, align 8, !tbaa !8
  store i64 %448, ptr %38, align 8, !tbaa !8
  %449 = load i64, ptr %37, align 8, !tbaa !8
  %450 = icmp eq i64 %449, 0
  br i1 %450, label %451, label %459

451:                                              ; preds = %445
  %452 = load i64, ptr %35, align 8, !tbaa !8
  %453 = getelementptr inbounds [200000 x i64], ptr @c0, i64 0, i64 %452
  %454 = load i64, ptr %453, align 8, !tbaa !8
  %455 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %454
  %456 = load i64, ptr %455, align 8, !tbaa !8
  %457 = load i64, ptr %38, align 8, !tbaa !8
  %458 = sub nsw i64 %457, %456
  store i64 %458, ptr %38, align 8, !tbaa !8
  br label %459

459:                                              ; preds = %451, %445
  %460 = load i64, ptr %35, align 8, !tbaa !8
  %461 = load i64, ptr %37, align 8, !tbaa !8
  %462 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %460, i64 noundef %461)
  br i1 %462, label %463, label %490

463:                                              ; preds = %459
  %464 = load i64, ptr %37, align 8, !tbaa !8
  %465 = icmp ne i64 %464, 0
  br i1 %465, label %466, label %490

466:                                              ; preds = %463
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %467 = load i64, ptr %35, align 8, !tbaa !8
  %468 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %467
  %469 = load i64, ptr %468, align 8, !tbaa !8
  store i64 %469, ptr %39, align 8, !tbaa !8
  %470 = load i64, ptr %35, align 8, !tbaa !8
  %471 = icmp eq i64 %470, 0
  br i1 %471, label %472, label %480

472:                                              ; preds = %466
  %473 = load i64, ptr %37, align 8, !tbaa !8
  %474 = getelementptr inbounds [200000 x i64], ptr @c0, i64 0, i64 %473
  %475 = load i64, ptr %474, align 8, !tbaa !8
  %476 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %475
  %477 = load i64, ptr %476, align 8, !tbaa !8
  %478 = load i64, ptr %39, align 8, !tbaa !8
  %479 = sub nsw i64 %478, %477
  store i64 %479, ptr %39, align 8, !tbaa !8
  br label %480

480:                                              ; preds = %472, %466
  %481 = load i64, ptr %38, align 8, !tbaa !8
  %482 = load i64, ptr %39, align 8, !tbaa !8
  %483 = load i64, ptr %36, align 8, !tbaa !8
  %484 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %483
  %485 = load i64, ptr %484, align 8, !tbaa !8
  %486 = sub nsw i64 %482, %485
  %487 = mul nsw i64 %481, %486
  %488 = load i64, ptr %33, align 8, !tbaa !8
  %489 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %488
  store i64 %487, ptr %489, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %502

490:                                              ; preds = %463, %459
  %491 = load i64, ptr %38, align 8, !tbaa !8
  %492 = load i64, ptr %35, align 8, !tbaa !8
  %493 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %492
  %494 = load i64, ptr %493, align 8, !tbaa !8
  %495 = load i64, ptr %36, align 8, !tbaa !8
  %496 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %495
  %497 = load i64, ptr %496, align 8, !tbaa !8
  %498 = sub nsw i64 %494, %497
  %499 = mul nsw i64 %491, %498
  %500 = load i64, ptr %33, align 8, !tbaa !8
  %501 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %500
  store i64 %499, ptr %501, align 8, !tbaa !8
  br label %502

502:                                              ; preds = %490, %480
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %503

503:                                              ; preds = %502
  %504 = load i64, ptr %33, align 8, !tbaa !8
  %505 = add nsw i64 %504, 1
  store i64 %505, ptr %33, align 8, !tbaa !8
  br label %357, !llvm.loop !21

506:                                              ; preds = %394, %361
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %507

507:                                              ; preds = %506
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  store i64 0, ptr %40, align 8, !tbaa !8
  br label %508

508:                                              ; preds = %522, %507
  %509 = load i64, ptr %40, align 8, !tbaa !8
  %510 = load i64, ptr @N, align 8, !tbaa !8
  %511 = add nsw i64 %510, 1
  %512 = icmp slt i64 %509, %511
  br i1 %512, label %514, label %513

513:                                              ; preds = %508
  store i32 28, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %529

514:                                              ; preds = %508
  %515 = load i64, ptr %40, align 8, !tbaa !8
  %516 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %515
  %517 = load i64, ptr %516, align 8, !tbaa !8
  %518 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %517)
          to label %519 unwind label %525

519:                                              ; preds = %514
  %520 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %518, ptr noundef @.str)
          to label %521 unwind label %525

521:                                              ; preds = %519
  br label %522

522:                                              ; preds = %521
  %523 = load i64, ptr %40, align 8, !tbaa !8
  %524 = add nsw i64 %523, 1
  store i64 %524, ptr %40, align 8, !tbaa !8
  br label %508, !llvm.loop !22

525:                                              ; preds = %519, %514
  %526 = landingpad { ptr, i32 }
          cleanup
  %527 = extractvalue { ptr, i32 } %526, 0
  store ptr %527, ptr %25, align 8
  %528 = extractvalue { ptr, i32 } %526, 1
  store i32 %528, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %532

529:                                              ; preds = %513
  %530 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %531 unwind label %339

531:                                              ; preds = %529
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  br label %48, !llvm.loop !23

532:                                              ; preds = %525, %339, %317
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  br label %535

533:                                              ; preds = %48
  %534 = load i32, ptr %1, align 4
  ret i32 %534

535:                                              ; preds = %532
  %536 = load ptr, ptr %25, align 8
  %537 = load i32, ptr %26, align 4
  %538 = insertvalue { ptr, i32 } poison, ptr %536, 0
  %539 = insertvalue { ptr, i32 } %538, i32 %537, 1
  resume { ptr, i32 } %539
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

; 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 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEiET0_T_S8_S7_(ptr, ptr, i32 noundef) #3

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !10, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !10, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_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 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@de = external dso_local local_unnamed_addr global [200000 x i64], align 16
@su = external dso_local global [200000 x i64], align 16
@ans = external dso_local global [200001 x i64], align 16
@up = external dso_local local_unnamed_addr global [20 x [200000 x i64]], align 16
@l = external dso_local global [200000 x i64], align 16
@r = external dso_local global [200000 x i64], align 16
@c0 = external dso_local local_unnamed_addr global [200000 x i64], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dfsxxxx(i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_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 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3lcaxx(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  %19 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %21 = load i64, ptr @T, align 8, !tbaa !8
  %22 = add nsw i64 %21, -1
  store i64 %22, ptr @T, align 8, !tbaa !8
  %.not188 = icmp eq i64 %21, 0
  br i1 %.not188, label %._crit_edge191, label %.lr.ph190

.lr.ph190:                                        ; preds = %0, %.backedge
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %24 = load i64, ptr @N, align 8, !tbaa !8
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %.lr.ph, label %._crit_edge

.preheader:                                       ; preds = %.lr.ph
  %26 = icmp sgt i64 %29, 1
  br i1 %26, label %.lr.ph151, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph190, %.lr.ph
  %.0113149 = phi i64 [ %28, %.lr.ph ], [ 0, %.lr.ph190 ]
  %27 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %.0113149
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  %28 = add nuw nsw i64 %.0113149, 1
  %29 = load i64, ptr @N, align 8, !tbaa !8
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %.lr.ph, label %.preheader, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph151, %.lr.ph190, %.preheader
  store i64 0, ptr @up, align 16, !tbaa !8
  %31 = call noundef i64 @_Z3dfsxxxx(i64 noundef 0, i64 noundef -1, i64 noundef 0, i64 noundef 0)
  %32 = load i64, ptr @N, align 8, !tbaa !8
  %gep = getelementptr i64, ptr getelementptr inbounds (i8, ptr @ans, i64 8), i64 %32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 0, ptr %3, align 4, !tbaa !13
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @ans, ptr noundef nonnull %gep, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %33 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  store ptr %33, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %34 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  store ptr %34, ptr %5, align 8
  %35 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %35, label %.lr.ph153, label %._crit_edge154

.lr.ph151:                                        ; preds = %.preheader, %.lr.ph151
  %.0114150 = phi i64 [ %42, %.lr.ph151 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %38 = load i64, ptr %1, align 8, !tbaa !8
  %39 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %38
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %40 = load i64, ptr %2, align 8, !tbaa !8
  %41 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %40
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %42 = add nuw nsw i64 %.0114150, 1
  %43 = load i64, ptr @N, align 8, !tbaa !8
  %44 = add nsw i64 %43, -1
  %45 = icmp slt i64 %42, %44
  br i1 %45, label %.lr.ph151, label %._crit_edge, !llvm.loop !15

._crit_edge154:                                   ; preds = %.lr.ph153, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %46 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  %47 = icmp eq i64 %46, 1
  br i1 %47, label %59, label %97

.lr.ph153:                                        ; preds = %._crit_edge, %.lr.ph153
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %49 = load i64, ptr %48, align 8, !tbaa !8
  %50 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !8
  %52 = add nsw i64 %51, -1
  %53 = mul nsw i64 %52, %51
  %54 = sdiv i64 %53, 2
  %55 = load i64, ptr @ans, align 16, !tbaa !8
  %56 = add nsw i64 %54, %55
  store i64 %56, ptr @ans, align 16, !tbaa !8
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %58 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %58, label %.lr.ph153, label %._crit_edge154

59:                                               ; preds = %._crit_edge154
  %60 = load i64, ptr @su, align 16, !tbaa !8
  %61 = load i64, ptr getelementptr inbounds (i8, ptr @su, i64 8), align 8, !tbaa !8
  %62 = xor i64 %61, -1
  %63 = add i64 %60, %62
  store i64 %63, ptr getelementptr inbounds (i8, ptr @ans, i64 8), align 8, !tbaa !8
  %64 = load i64, ptr @N, align 8, !tbaa !8
  %.not136178 = icmp slt i64 %64, 2
  br i1 %.not136178, label %.loopexit, label %.lr.ph182

.lr.ph182:                                        ; preds = %59, %85
  %.0115180 = phi i64 [ %.1116, %85 ], [ 1, %59 ]
  %.0117179 = phi i64 [ %86, %85 ], [ 2, %59 ]
  %65 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %.0117179, i64 noundef %.0115180)
  %66 = load i64, ptr @N, align 8
  %67 = icmp ne i64 %.0117179, %66
  %or.cond140.not = select i1 %65, i1 %67, i1 false
  br i1 %or.cond140.not, label %72, label %68

68:                                               ; preds = %.lr.ph182
  %69 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %.0115180
  %70 = load i64, ptr %69, align 8, !tbaa !8
  %71 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %.0117179
  store i64 %70, ptr %71, align 8, !tbaa !8
  br label %.loopexit

72:                                               ; preds = %.lr.ph182
  %73 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %.0117179
  %74 = load i64, ptr %73, align 8, !tbaa !8
  %75 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %.0115180
  %76 = load i64, ptr %75, align 8, !tbaa !8
  %77 = icmp sgt i64 %74, %76
  br i1 %77, label %78, label %85

78:                                               ; preds = %72
  %79 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %.0115180
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %.0117179
  %82 = load i64, ptr %81, align 8, !tbaa !8
  %83 = sub nsw i64 %80, %82
  %84 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %.0117179
  store i64 %83, ptr %84, align 8, !tbaa !8
  br label %85

85:                                               ; preds = %72, %78
  %.1116 = phi i64 [ %.0117179, %78 ], [ %.0115180, %72 ]
  %86 = add nuw nsw i64 %.0117179, 1
  %.not136.not = icmp slt i64 %.0117179, %66
  br i1 %.not136.not, label %.lr.ph182, label %.loopexit, !llvm.loop !16

.loopexit:                                        ; preds = %85, %59, %68
  %87 = phi i64 [ %64, %59 ], [ %66, %68 ], [ %66, %85 ]
  %.not137183 = icmp slt i64 %87, 0
  br i1 %.not137183, label %._crit_edge187, label %.lr.ph186

._crit_edge187:                                   ; preds = %.lr.ph186, %.loopexit
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
  br label %.backedge

.backedge:                                        ; preds = %._crit_edge187, %264
  %89 = load i64, ptr @T, align 8, !tbaa !8
  %90 = add nsw i64 %89, -1
  store i64 %90, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %89, 0
  br i1 %.not, label %._crit_edge191, label %.lr.ph190, !llvm.loop !17

.lr.ph186:                                        ; preds = %.loopexit, %.lr.ph186
  %.0122184 = phi i64 [ %95, %.lr.ph186 ], [ 0, %.loopexit ]
  %91 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %.0122184
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %92)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @.str)
  %95 = add nuw nsw i64 %.0122184, 1
  %96 = load i64, ptr @N, align 8, !tbaa !8
  %.not137.not = icmp slt i64 %.0122184, %96
  br i1 %.not137.not, label %.lr.ph186, label %._crit_edge187, !llvm.loop !18

97:                                               ; preds = %._crit_edge154
  %98 = load i64, ptr @N, align 8, !tbaa !8
  %99 = getelementptr inbounds i64, ptr @l, i64 %98
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 -1, ptr %6, align 4, !tbaa !13
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @l, ptr noundef nonnull %99, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %100 = load i64, ptr @N, align 8, !tbaa !8
  %101 = getelementptr inbounds i64, ptr @r, i64 %100
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 -1, ptr %7, align 4, !tbaa !13
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @r, ptr noundef nonnull %101, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  store i64 0, ptr @r, align 16, !tbaa !8
  store i64 0, ptr @l, align 16, !tbaa !8
  %102 = load i64, ptr @N, align 8, !tbaa !8
  %103 = icmp sgt i64 %102, 1
  br i1 %103, label %.lr.ph157, label %._crit_edge158

.lr.ph157:                                        ; preds = %97, %142
  %.0124155 = phi i64 [ %143, %142 ], [ 1, %97 ]
  %104 = add nsw i64 %.0124155, -1
  %105 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !8
  %107 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %106, i64 noundef %.0124155)
  br i1 %107, label %108, label %124

108:                                              ; preds = %.lr.ph157
  %109 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %104
  %110 = load i64, ptr %109, align 8, !tbaa !8
  %111 = call noundef i64 @_Z3lcaxx(i64 noundef %110, i64 noundef %.0124155)
  %112 = icmp eq i64 %111, 0
  br i1 %112, label %113, label %124

113:                                              ; preds = %108
  %114 = load i64, ptr %105, align 8, !tbaa !8
  %115 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %.0124155
  store i64 %114, ptr %115, align 8, !tbaa !8
  %116 = load i64, ptr %109, align 8, !tbaa !8
  %117 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %.0124155
  store i64 %116, ptr %117, align 8, !tbaa !8
  %118 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %.0124155
  %119 = load i64, ptr %118, align 8, !tbaa !8
  %120 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %114
  %121 = load i64, ptr %120, align 8, !tbaa !8
  %122 = icmp sgt i64 %119, %121
  br i1 %122, label %123, label %142

123:                                              ; preds = %113
  store i64 %.0124155, ptr %115, align 8, !tbaa !8
  br label %142

124:                                              ; preds = %108, %.lr.ph157
  %125 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %104
  %126 = load i64, ptr %125, align 8, !tbaa !8
  %127 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %126, i64 noundef %.0124155)
  br i1 %127, label %128, label %._crit_edge158

128:                                              ; preds = %124
  %129 = load i64, ptr %105, align 8, !tbaa !8
  %130 = call noundef i64 @_Z3lcaxx(i64 noundef %129, i64 noundef %.0124155)
  %131 = icmp eq i64 %130, 0
  br i1 %131, label %132, label %._crit_edge158

132:                                              ; preds = %128
  %133 = load i64, ptr %105, align 8, !tbaa !8
  %134 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %.0124155
  store i64 %133, ptr %134, align 8, !tbaa !8
  %135 = load i64, ptr %125, align 8, !tbaa !8
  %136 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %.0124155
  %137 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %.0124155
  %138 = load i64, ptr %137, align 8, !tbaa !8
  %139 = getelementptr inbounds [200000 x i64], ptr @de, i64 0, i64 %135
  %140 = load i64, ptr %139, align 8, !tbaa !8
  %141 = icmp sgt i64 %138, %140
  %spec.store.select = select i1 %141, i64 %.0124155, i64 %135
  store i64 %spec.store.select, ptr %136, align 8
  br label %142

142:                                              ; preds = %132, %123, %113
  %143 = add nuw nsw i64 %.0124155, 1
  %144 = load i64, ptr @N, align 8, !tbaa !8
  %145 = icmp slt i64 %143, %144
  br i1 %145, label %.lr.ph157, label %._crit_edge158, !llvm.loop !19

._crit_edge158:                                   ; preds = %142, %128, %124, %97
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %146 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  store ptr %146, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %147 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @graph) #7
  store ptr %147, ptr %10, align 8
  %148 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %148, label %.lr.ph162, label %._crit_edge163

._crit_edge163:                                   ; preds = %171, %._crit_edge158
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %149 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %150 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %151 = call noundef i32 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEiET0_T_S8_S7_(ptr %149, ptr %150, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %152 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  store ptr %152, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %153 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  store ptr %153, ptr %13, align 8
  %154 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %154, label %.lr.ph166.preheader, label %._crit_edge167

.lr.ph166.preheader:                              ; preds = %._crit_edge163
  %155 = sext i32 %151 to i64
  br label %.lr.ph166

.lr.ph162:                                        ; preds = %._crit_edge158, %171
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %157 = load i64, ptr %156, align 8, !tbaa !8
  %158 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %157, i64 noundef 1)
  br i1 %158, label %159, label %167

159:                                              ; preds = %.lr.ph162
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %160 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %157
  %161 = load i64, ptr %160, align 8, !tbaa !8
  %162 = load i64, ptr getelementptr inbounds (i8, ptr @su, i64 8), align 8, !tbaa !8
  %163 = sub nsw i64 %161, %162
  store i64 %163, ptr %11, align 8, !tbaa !8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %164 unwind label %165

164:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %171

165:                                              ; preds = %159
  %166 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %174

167:                                              ; preds = %.lr.ph162
  %168 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %157
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %168)
          to label %171 unwind label %169

169:                                              ; preds = %167
  %170 = landingpad { ptr, i32 }
          cleanup
  br label %174

171:                                              ; preds = %167, %164
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %173 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %173, label %.lr.ph162, label %._crit_edge163

174:                                              ; preds = %169, %165
  %.pn = phi { ptr, i32 } [ %166, %165 ], [ %170, %169 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %265

._crit_edge167:                                   ; preds = %.lr.ph166, %._crit_edge163
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  %175 = load i64, ptr @N, align 8, !tbaa !8
  %.not130168 = icmp slt i64 %175, 2
  br i1 %.not130168, label %.loopexit145, label %.lr.ph172

176:                                              ; preds = %._crit_edge177
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %265

.lr.ph166:                                        ; preds = %.lr.ph166.preheader, %.lr.ph166
  %.0123164 = phi i64 [ %180, %.lr.ph166 ], [ %155, %.lr.ph166.preheader ]
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %179 = load i64, ptr %178, align 8, !tbaa !8
  %180 = sub nsw i64 %.0123164, %179
  %181 = mul nsw i64 %180, %179
  %182 = load i64, ptr getelementptr inbounds (i8, ptr @ans, i64 8), align 8, !tbaa !8
  %183 = add nsw i64 %181, %182
  store i64 %183, ptr getelementptr inbounds (i8, ptr @ans, i64 8), align 8, !tbaa !8
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %185 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %185, label %.lr.ph166, label %._crit_edge167

.lr.ph172:                                        ; preds = %._crit_edge167, %244
  %186 = phi i64 [ %251, %244 ], [ %175, %._crit_edge167 ]
  %.0112169 = phi i64 [ %250, %244 ], [ 2, %._crit_edge167 ]
  %187 = icmp eq i64 %.0112169, %186
  br i1 %187, label %192, label %188

188:                                              ; preds = %.lr.ph172
  %189 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %.0112169
  %190 = load i64, ptr %189, align 8, !tbaa !8
  %191 = icmp eq i64 %190, -1
  br i1 %191, label %192, label %214

192:                                              ; preds = %188, %.lr.ph172
  %.0112169.lcssa = phi i64 [ %.0112169, %188 ], [ %186, %.lr.ph172 ]
  %193 = add nsw i64 %.0112169.lcssa, -1
  %194 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !8
  %196 = icmp eq i64 %195, 0
  br i1 %196, label %199, label %._crit_edge196

._crit_edge196:                                   ; preds = %192
  %197 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %195
  %198 = load i64, ptr %197, align 8, !tbaa !8
  %.phi.trans.insert197 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %193
  %.pre198 = load i64, ptr %.phi.trans.insert197, align 8, !tbaa !8
  br label %208

199:                                              ; preds = %192
  %200 = load i64, ptr @su, align 16, !tbaa !8
  %201 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %193
  %202 = load i64, ptr %201, align 8, !tbaa !8
  %203 = getelementptr inbounds [200000 x i64], ptr @c0, i64 0, i64 %202
  %204 = load i64, ptr %203, align 8, !tbaa !8
  %205 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %204
  %206 = load i64, ptr %205, align 8, !tbaa !8
  %207 = sub nsw i64 %200, %206
  br label %208

208:                                              ; preds = %._crit_edge196, %199
  %209 = phi i64 [ %202, %199 ], [ %.pre198, %._crit_edge196 ]
  %.0111 = phi i64 [ %207, %199 ], [ %198, %._crit_edge196 ]
  %210 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %209
  %211 = load i64, ptr %210, align 8, !tbaa !8
  %212 = mul nsw i64 %211, %.0111
  %213 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %.0112169.lcssa
  store i64 %212, ptr %213, align 8, !tbaa !8
  br label %.loopexit145

214:                                              ; preds = %188
  %215 = add nsw i64 %.0112169, -1
  %216 = getelementptr inbounds [200000 x i64], ptr @l, i64 0, i64 %215
  %217 = load i64, ptr %216, align 8, !tbaa !8
  %.not131 = icmp eq i64 %217, %190
  %.phi.trans.insert = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %.0112169
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !8
  %. = select i1 %.not131, i64 0, i64 %217
  %.206 = select i1 %.not131, i64 0, i64 %190
  %..pre = select i1 %.not131, i64 0, i64 %.pre
  %218 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %215
  %219 = load i64, ptr %218, align 8, !tbaa !8
  %.not132 = icmp eq i64 %219, %.pre
  %.1110 = select i1 %.not132, i64 %., i64 %219
  %.1108 = select i1 %.not132, i64 %.206, i64 %.pre
  %.1 = select i1 %.not132, i64 %..pre, i64 %190
  %220 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %.1
  %221 = load i64, ptr %220, align 8, !tbaa !8
  %222 = icmp eq i64 %.1, 0
  br i1 %222, label %.thread, label %229

.thread:                                          ; preds = %214
  %223 = getelementptr inbounds [200000 x i64], ptr @c0, i64 0, i64 %.1110
  %224 = load i64, ptr %223, align 8, !tbaa !8
  %225 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %224
  %226 = load i64, ptr %225, align 8, !tbaa !8
  %227 = sub nsw i64 %221, %226
  %228 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %.1110, i64 noundef 0)
  br label %241

229:                                              ; preds = %214
  %230 = call noundef zeroext i1 @_Z11is_ancestorxx(i64 noundef %.1110, i64 noundef %.1)
  br i1 %230, label %231, label %241

231:                                              ; preds = %229
  %232 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %.1110
  %233 = load i64, ptr %232, align 8, !tbaa !8
  %234 = icmp eq i64 %.1110, 0
  br i1 %234, label %235, label %244

235:                                              ; preds = %231
  %236 = getelementptr inbounds [200000 x i64], ptr @c0, i64 0, i64 %.1
  %237 = load i64, ptr %236, align 8, !tbaa !8
  %238 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %237
  %239 = load i64, ptr %238, align 8, !tbaa !8
  %240 = sub nsw i64 %233, %239
  br label %244

241:                                              ; preds = %.thread, %229
  %.0105143 = phi i64 [ %227, %.thread ], [ %221, %229 ]
  %242 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %.1110
  %243 = load i64, ptr %242, align 8, !tbaa !8
  br label %244

244:                                              ; preds = %231, %235, %241
  %.sink = phi i64 [ %243, %241 ], [ %240, %235 ], [ %233, %231 ]
  %.0105143.sink = phi i64 [ %.0105143, %241 ], [ %221, %235 ], [ %221, %231 ]
  %245 = getelementptr inbounds [200000 x i64], ptr @su, i64 0, i64 %.1108
  %246 = load i64, ptr %245, align 8, !tbaa !8
  %247 = sub nsw i64 %.sink, %246
  %248 = mul nsw i64 %247, %.0105143.sink
  %249 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %.0112169
  store i64 %248, ptr %249, align 8, !tbaa !8
  %250 = add nuw nsw i64 %.0112169, 1
  %251 = load i64, ptr @N, align 8, !tbaa !8
  %.not130.not = icmp slt i64 %.0112169, %251
  br i1 %.not130.not, label %.lr.ph172, label %.loopexit145, !llvm.loop !20

.loopexit145:                                     ; preds = %244, %._crit_edge167, %208
  %252 = phi i64 [ %175, %._crit_edge167 ], [ %186, %208 ], [ %251, %244 ]
  %.not133173 = icmp slt i64 %252, 0
  br i1 %.not133173, label %._crit_edge177, label %.lr.ph176

._crit_edge177:                                   ; preds = %259, %.loopexit145
  %253 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %264 unwind label %176

.lr.ph176:                                        ; preds = %.loopexit145, %259
  %.0174 = phi i64 [ %260, %259 ], [ 0, %.loopexit145 ]
  %254 = getelementptr inbounds [200001 x i64], ptr @ans, i64 0, i64 %.0174
  %255 = load i64, ptr %254, align 8, !tbaa !8
  %256 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %255)
          to label %257 unwind label %262

257:                                              ; preds = %.lr.ph176
  %258 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %256, ptr noundef nonnull @.str)
          to label %259 unwind label %262

259:                                              ; preds = %257
  %260 = add nuw nsw i64 %.0174, 1
  %261 = load i64, ptr @N, align 8, !tbaa !8
  %.not133.not = icmp slt i64 %.0174, %261
  br i1 %.not133.not, label %.lr.ph176, label %._crit_edge177, !llvm.loop !21

262:                                              ; preds = %257, %.lr.ph176
  %263 = landingpad { ptr, i32 }
          cleanup
  br label %265

264:                                              ; preds = %._crit_edge177
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %.backedge

265:                                              ; preds = %262, %176, %174
  %.pn.pn = phi { ptr, i32 } [ %.pn, %174 ], [ %263, %262 ], [ %177, %176 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  resume { ptr, i32 } %.pn.pn

._crit_edge191:                                   ; preds = %.backedge, %0
  ret i32 0
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

; 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 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) 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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEiET0_T_S8_S7_(ptr, ptr, i32 noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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