; LLVM IR from eyangch/competitive-programming :: Codeforces/1174 (f)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i64, align 8
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@sz = external dso_local global [200000 x i64], align 16
@sb = external dso_local global [200000 x i64], align 16
@dr = external dso_local global i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z2qdx(i64 noundef) #0

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

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

; 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

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

; 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)) #0 align 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 uwtable
declare dso_local noundef i64 @_Z2qsx(i64 noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 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)) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z6calc_dx(i64 noundef) #3

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 {
  %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 i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i8, align 1
  %18 = alloca ptr, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %28 = 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 %29

29:                                               ; preds = %48, %0
  %30 = load i64, ptr %2, align 8, !tbaa !8
  %31 = load i64, ptr @N, align 8, !tbaa !8
  %32 = sub nsw i64 %31, 1
  %33 = icmp slt i64 %30, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #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) %3)
  %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) %4)
  %38 = load i64, ptr %3, align 8, !tbaa !8
  %39 = sub nsw i64 %38, 1
  %40 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %41 = load i64, ptr %4, align 8, !tbaa !8
  %42 = sub nsw i64 %41, 1
  store i64 %42, ptr %5, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %43 = load i64, ptr %4, align 8, !tbaa !8
  %44 = sub nsw i64 %43, 1
  %45 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %46 = load i64, ptr %3, align 8, !tbaa !8
  %47 = sub nsw i64 %46, 1
  store i64 %47, ptr %6, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %48

48:                                               ; preds = %35
  %49 = load i64, ptr %2, align 8, !tbaa !8
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %2, align 8, !tbaa !8
  br label %29, !llvm.loop !11

51:                                               ; preds = %34
  %52 = call noundef i64 @_Z6dfs_szxx(i64 noundef 0, i64 noundef -1)
  %53 = call noundef i64 @_Z2qdx(i64 noundef 0)
  store i64 %53, ptr @dr, align 8, !tbaa !8
  %54 = call noundef i64 @_Z6dfs_sbxxx(i64 noundef 0, i64 noundef -1, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %55

55:                                               ; preds = %131, %51
  %56 = load i64, ptr %7, align 8, !tbaa !8
  %57 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !8
  %59 = icmp sgt i64 %58, 1
  br i1 %59, label %60, label %132

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %61 = load i64, ptr %7, align 8, !tbaa !8
  %62 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %61
  %63 = load i64, ptr %62, align 8, !tbaa !8
  store i64 %63, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  store i8 1, ptr %9, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %64 = load i64, ptr %7, align 8, !tbaa !8
  %65 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %64
  store ptr %65, ptr %10, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %66 = load ptr, ptr %10, align 8, !tbaa !15
  %67 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #7
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %69 = load ptr, ptr %10, align 8, !tbaa !15
  %70 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #7
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  br label %72

72:                                               ; preds = %101, %60
  %73 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br i1 %73, label %75, label %74

74:                                               ; preds = %72
  store i32 7, ptr %13, align 4
  br label %103

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %77 = load i64, ptr %76, align 8, !tbaa !8
  store i64 %77, ptr %14, align 8, !tbaa !8
  %78 = load i64, ptr %7, align 8, !tbaa !8
  %79 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = load i64, ptr %14, align 8, !tbaa !8
  %82 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !8
  %84 = icmp slt i64 %80, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %75
  store i32 8, ptr %13, align 4
  br label %98

86:                                               ; preds = %75
  %87 = load i64, ptr %14, align 8, !tbaa !8
  %88 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !8
  %90 = load i64, ptr %7, align 8, !tbaa !8
  %91 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = mul nsw i64 2, %92
  %94 = sdiv i64 %93, 3
  %95 = icmp sge i64 %89, %94
  br i1 %95, label %96, label %97

96:                                               ; preds = %86
  store i8 0, ptr %9, align 1, !tbaa !13
  store i32 7, ptr %13, align 4
  br label %98

97:                                               ; preds = %86
  store i32 0, ptr %13, align 4
  br label %98

98:                                               ; preds = %97, %96, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %99 = load i32, ptr %13, align 4
  switch i32 %99, label %103 [
    i32 0, label %100
    i32 8, label %101
  ]

100:                                              ; preds = %98
  br label %101

101:                                              ; preds = %100, %98
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %72

103:                                              ; preds = %98, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %104

104:                                              ; preds = %103
  %105 = load i8, ptr %9, align 1, !tbaa !13, !range !17, !noundef !18
  %106 = trunc i8 %105 to i1
  br i1 %106, label %107, label %110

107:                                              ; preds = %104
  %108 = load i64, ptr %7, align 8, !tbaa !8
  %109 = call noundef i64 @_Z2qsx(i64 noundef %108)
  store i64 %109, ptr %7, align 8, !tbaa !8
  br label %131

110:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %111 = load i64, ptr %7, align 8, !tbaa !8
  %112 = load i64, ptr %7, align 8, !tbaa !8
  %113 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !8
  %115 = call noundef i64 @_Z6dfs_tdxx(i64 noundef %111, i64 noundef %114)
  store i64 %115, ptr %15, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %116 = load i64, ptr %15, align 8, !tbaa !8
  %117 = call noundef i64 @_Z2qdx(i64 noundef %116)
  store i64 %117, ptr %16, align 8, !tbaa !8
  %118 = load i64, ptr %16, align 8, !tbaa !8
  %119 = load i64, ptr %15, align 8, !tbaa !8
  %120 = call noundef i64 @_Z6calc_dx(i64 noundef %119)
  %121 = icmp sgt i64 %118, %120
  br i1 %121, label %122, label %128

122:                                              ; preds = %110
  %123 = load i64, ptr %15, align 8, !tbaa !8
  %124 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %123
  store i64 0, ptr %124, align 8, !tbaa !8
  %125 = load i64, ptr %7, align 8, !tbaa !8
  %126 = load i64, ptr %15, align 8, !tbaa !8
  %127 = call noundef i64 @_Z7dfs_updxx(i64 noundef %125, i64 noundef %126)
  br label %130

128:                                              ; preds = %110
  %129 = load i64, ptr %15, align 8, !tbaa !8
  store i64 %129, ptr %7, align 8, !tbaa !8
  br label %130

130:                                              ; preds = %128, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %131

131:                                              ; preds = %130, %107
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %55, !llvm.loop !19

132:                                              ; preds = %55
  br label %133

133:                                              ; preds = %178, %132
  br label %134

134:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  store i8 0, ptr %17, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %135 = load i64, ptr %7, align 8, !tbaa !8
  %136 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %135
  store ptr %136, ptr %18, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %137 = load ptr, ptr %18, align 8, !tbaa !15
  %138 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #7
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %140 = load ptr, ptr %18, align 8, !tbaa !15
  %141 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %140) #7
  %142 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %141, ptr %142, align 8
  br label %143

143:                                              ; preds = %168, %134
  %144 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br i1 %144, label %146, label %145

145:                                              ; preds = %143
  store i32 11, ptr %13, align 4
  br label %170

146:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  %148 = load i64, ptr %147, align 8, !tbaa !8
  store i64 %148, ptr %21, align 8, !tbaa !8
  %149 = load i64, ptr %21, align 8, !tbaa !8
  %150 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !8
  %152 = load i64, ptr %7, align 8, !tbaa !8
  %153 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !8
  %155 = icmp sgt i64 %151, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %146
  store i32 12, ptr %13, align 4
  br label %165

157:                                              ; preds = %146
  %158 = load i64, ptr %21, align 8, !tbaa !8
  %159 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !8
  %161 = icmp ne i64 %160, 0
  br i1 %161, label %162, label %164

162:                                              ; preds = %157
  store i8 1, ptr %17, align 1, !tbaa !13
  %163 = load i64, ptr %21, align 8, !tbaa !8
  store i64 %163, ptr %7, align 8, !tbaa !8
  store i32 11, ptr %13, align 4
  br label %165

164:                                              ; preds = %157
  store i32 0, ptr %13, align 4
  br label %165

165:                                              ; preds = %164, %162, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  %166 = load i32, ptr %13, align 4
  switch i32 %166, label %170 [
    i32 0, label %167
    i32 12, label %168
  ]

167:                                              ; preds = %165
  br label %168

168:                                              ; preds = %167, %165
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %143

170:                                              ; preds = %165, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %171

171:                                              ; preds = %170
  %172 = load i8, ptr %17, align 1, !tbaa !13, !range !17, !noundef !18
  %173 = trunc i8 %172 to i1
  br i1 %173, label %175, label %174

174:                                              ; preds = %171
  store i32 10, ptr %13, align 4
  br label %176

175:                                              ; preds = %171
  store i32 0, ptr %13, align 4
  br label %176

176:                                              ; preds = %175, %174
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  %177 = load i32, ptr %13, align 4
  switch i32 %177, label %186 [
    i32 0, label %178
    i32 10, label %179
  ]

178:                                              ; preds = %176
  br label %133, !llvm.loop !20

179:                                              ; preds = %176
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %181 = load i64, ptr %7, align 8, !tbaa !8
  %182 = add nsw i64 %181, 1
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %180, i64 noundef %182)
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %183, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %185 = load i32, ptr %1, align 4
  ret i32 %185

186:                                              ; preds = %176
  unreachable
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #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)) #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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { "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 = !{!"bool", !10, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !10, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i64, align 8
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@sz = external dso_local local_unnamed_addr global [200000 x i64], align 16
@sb = external dso_local local_unnamed_addr global [200000 x i64], align 16
@dr = external dso_local local_unnamed_addr global i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

; 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

; 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 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 #0 align 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 uwtable
declare dso_local noundef i64 @_Z2qsx(i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 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 #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z6calc_dx(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  %14 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = 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) @N)
  %16 = load i64, ptr @N, align 8, !tbaa !8
  %17 = icmp sgt i64 %16, 1
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %18 = call noundef i64 @_Z6dfs_szxx(i64 noundef 0, i64 noundef -1)
  %19 = call noundef i64 @_Z2qdx(i64 noundef 0)
  store i64 %19, ptr @dr, align 8, !tbaa !8
  %20 = call noundef i64 @_Z6dfs_sbxxx(i64 noundef 0, i64 noundef -1, i64 noundef 0)
  %21 = load i64, ptr @sb, align 16, !tbaa !8
  %22 = icmp sgt i64 %21, 1
  br i1 %22, label %.lr.ph66, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.060 = phi i64 [ %35, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %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) %1)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %25 = load i64, ptr %1, align 8, !tbaa !8
  %26 = add nsw i64 %25, -1
  %27 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %28 = load i64, ptr %2, align 8, !tbaa !8
  %29 = add nsw i64 %28, -1
  store i64 %29, ptr %3, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %30 = load i64, ptr %2, align 8, !tbaa !8
  %31 = add nsw i64 %30, -1
  %32 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %33 = load i64, ptr %1, align 8, !tbaa !8
  %34 = add nsw i64 %33, -1
  store i64 %34, ptr %4, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %35 = add nuw nsw i64 %.060, 1
  %36 = load i64, ptr @N, align 8, !tbaa !8
  %37 = add nsw i64 %36, -1
  %38 = icmp slt i64 %35, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %73, %._crit_edge
  %.034.lcssa = phi i64 [ 0, %._crit_edge ], [ %.2, %73 ]
  %39 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %.034.lcssa
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %40 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  store ptr %40, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %41 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  store ptr %41, ptr %8, align 8
  %42 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %42, label %.lr.ph68, label %.loopexit

.lr.ph66:                                         ; preds = %._crit_edge, %73
  %43 = phi ptr [ %74, %73 ], [ @sb, %._crit_edge ]
  %.03463 = phi i64 [ %.2, %73 ], [ 0, %._crit_edge ]
  %44 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %.03463
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %45 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #7
  store ptr %45, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %46 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #7
  store ptr %46, ptr %6, align 8
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %47, label %.lr.ph62, label %.loopexit82

.lr.ph62:                                         ; preds = %.lr.ph66
  %48 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %.03463
  br label %49

49:                                               ; preds = %.lr.ph62, %select.unfold
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %51 = load i64, ptr %50, align 8, !tbaa !8
  %52 = load i64, ptr %48, align 8, !tbaa !8
  %53 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %51
  %54 = load i64, ptr %53, align 8, !tbaa !8
  %55 = icmp slt i64 %52, %54
  br i1 %55, label %select.unfold, label %56

56:                                               ; preds = %49
  %57 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %51
  %58 = load i64, ptr %57, align 8, !tbaa !8
  %59 = load i64, ptr %43, align 8, !tbaa !8
  %60 = shl nsw i64 %59, 1
  %61 = sdiv i64 %60, 3
  %.not44 = icmp slt i64 %58, %61
  br i1 %.not44, label %select.unfold, label %65

select.unfold:                                    ; preds = %56, %49
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %63 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %63, label %49, label %.loopexit82

.loopexit82:                                      ; preds = %select.unfold, %.lr.ph66
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %64 = call noundef i64 @_Z2qsx(i64 noundef %.03463)
  br label %73

65:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %66 = call noundef i64 @_Z6dfs_tdxx(i64 noundef %.03463, i64 noundef %59)
  %67 = call noundef i64 @_Z2qdx(i64 noundef %66)
  %68 = call noundef i64 @_Z6calc_dx(i64 noundef %66)
  %69 = icmp sgt i64 %67, %68
  br i1 %69, label %70, label %73

70:                                               ; preds = %65
  %71 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %66
  store i64 0, ptr %71, align 8, !tbaa !8
  %72 = call noundef i64 @_Z7dfs_updxx(i64 noundef %.03463, i64 noundef %66)
  br label %73

73:                                               ; preds = %70, %65, %.loopexit82
  %.2 = phi i64 [ %64, %.loopexit82 ], [ %.03463, %70 ], [ %66, %65 ]
  %74 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %.2
  %75 = load i64, ptr %74, align 8, !tbaa !8
  %76 = icmp sgt i64 %75, 1
  br i1 %76, label %.lr.ph66, label %.preheader, !llvm.loop !13

.lr.ph68:                                         ; preds = %.preheader, %._crit_edge69
  %.392 = phi i64 [ %80, %._crit_edge69 ], [ %.034.lcssa, %.preheader ]
  %77 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %.392
  br label %78

78:                                               ; preds = %.lr.ph68, %select.unfold50
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !8
  %83 = load i64, ptr %77, align 8, !tbaa !8
  %84 = icmp sgt i64 %82, %83
  br i1 %84, label %select.unfold50, label %85

85:                                               ; preds = %78
  %86 = getelementptr inbounds [200000 x i64], ptr @sb, i64 0, i64 %80
  %87 = load i64, ptr %86, align 8, !tbaa !8
  %.not = icmp eq i64 %87, 0
  br i1 %.not, label %select.unfold50, label %._crit_edge69

select.unfold50:                                  ; preds = %85, %78
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %89 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %89, label %78, label %.loopexit

._crit_edge69:                                    ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %90 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %91 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #7
  store ptr %91, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %92 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #7
  store ptr %92, ptr %8, align 8
  %93 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %93, label %.lr.ph68, label %.loopexit

.loopexit:                                        ; preds = %._crit_edge69, %select.unfold50, %.preheader
  %.390 = phi i64 [ %.034.lcssa, %.preheader ], [ %.392, %select.unfold50 ], [ %80, %._crit_edge69 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %95 = add nsw i64 %.390, 1
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %94, i64 noundef %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %96, i8 noundef signext 10)
  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 #3 align 2

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass