; LLVM IR from eyangch/competitive-programming :: Codeforces/1363 (e)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@nodes = external dso_local global [200000 x [3 x i32]], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@costs = external dso_local global [200000 x i32], align 16
@depth = external dso_local global [200000 x i32], align 16
@revdepth = external dso_local global [200000 x %"class.std::vector"], align 16
@zo = external dso_local global [200000 x i32], align 16
@oz = external dso_local global [200000 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9dfs_costsii(i32 noundef, i32 noundef) #1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9dfs_depthii(i32 noundef, i32 noundef) #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector", align 8
  %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 i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %29 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %30 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %31 = getelementptr i8, ptr %30, i64 -24
  %32 = load i64, ptr %31, align 8
  %33 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %32
  %34 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %33, ptr noundef null)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %36

36:                                               ; preds = %57, %0
  %37 = load i32, ptr %2, align 4, !tbaa !8
  %38 = load i32, ptr @N, align 4, !tbaa !8
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %60

41:                                               ; preds = %36
  %42 = load i32, ptr %2, align 4, !tbaa !8
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %43
  %45 = getelementptr inbounds [3 x i32], ptr %44, i64 0, i64 0
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %45)
  %47 = load i32, ptr %2, align 4, !tbaa !8
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %48
  %50 = getelementptr inbounds [3 x i32], ptr %49, i64 0, i64 1
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %52 = load i32, ptr %2, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %53
  %55 = getelementptr inbounds [3 x i32], ptr %54, i64 0, i64 2
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %55)
  br label %57

57:                                               ; preds = %41
  %58 = load i32, ptr %2, align 4, !tbaa !8
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %2, align 4, !tbaa !8
  br label %36, !llvm.loop !11

60:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %61

61:                                               ; preds = %82, %60
  %62 = load i32, ptr %3, align 4, !tbaa !8
  %63 = load i32, ptr @N, align 4, !tbaa !8
  %64 = sub nsw i32 %63, 1
  %65 = icmp slt i32 %62, %64
  br i1 %65, label %67, label %66

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

67:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %70 = load i32, ptr %4, align 4, !tbaa !8
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %74 = load i32, ptr %5, align 4, !tbaa !8
  %75 = sub nsw i32 %74, 1
  store i32 %75, ptr %6, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %73, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %76 = load i32, ptr %5, align 4, !tbaa !8
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %80 = load i32, ptr %4, align 4, !tbaa !8
  %81 = sub nsw i32 %80, 1
  store i32 %81, ptr %7, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %79, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %82

82:                                               ; preds = %67
  %83 = load i32, ptr %3, align 4, !tbaa !8
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %3, align 4, !tbaa !8
  br label %61, !llvm.loop !13

85:                                               ; preds = %66
  %86 = load i32, ptr @N, align 4, !tbaa !8
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr @costs, i64 %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 -1, ptr %8, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @costs, ptr noundef %88, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @_Z9dfs_costsii(i32 noundef 0, i32 noundef 2147483647)
  %89 = load i32, ptr @N, align 4, !tbaa !8
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr @depth, i64 %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 -1, ptr %9, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @depth, ptr noundef %91, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @_Z9dfs_depthii(i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %92 = load i32, ptr @N, align 4, !tbaa !8
  %93 = sub nsw i32 %92, 1
  store i32 %93, ptr %11, align 4, !tbaa !8
  br label %94

94:                                               ; preds = %267, %85
  %95 = load i32, ptr %11, align 4, !tbaa !8
  %96 = icmp sge i32 %95, 0
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %270

98:                                               ; preds = %94
  %99 = load i32, ptr %11, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @revdepth, i64 0, i64 %100
  %102 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #7
  %103 = icmp eq i64 %102, 0
  br i1 %103, label %104, label %105

104:                                              ; preds = %98
  br label %267

105:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %106 = load i32, ptr %11, align 4, !tbaa !8
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @revdepth, i64 0, i64 %107
  store ptr %108, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %109 = load ptr, ptr %13, align 8, !tbaa !16
  %110 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %109) #7
  %111 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %110, ptr %111, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %112 = load ptr, ptr %13, align 8, !tbaa !16
  %113 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %112) #7
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  br label %115

115:                                              ; preds = %259, %105
  %116 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %116, label %118, label %117

117:                                              ; preds = %115
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %266

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %120 = load i32, ptr %119, align 4, !tbaa !8
  store i32 %120, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  %121 = load i32, ptr %16, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %122
  %124 = getelementptr inbounds [3 x i32], ptr %123, i64 0, i64 1
  %125 = load i32, ptr %124, align 4, !tbaa !8
  %126 = icmp eq i32 %125, 1
  br i1 %126, label %127, label %134

127:                                              ; preds = %118
  %128 = load i32, ptr %16, align 4, !tbaa !8
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %129
  %131 = getelementptr inbounds [3 x i32], ptr %130, i64 0, i64 2
  %132 = load i32, ptr %131, align 4, !tbaa !8
  %133 = icmp eq i32 %132, 0
  br label %134

134:                                              ; preds = %127, %118
  %135 = phi i1 [ false, %118 ], [ %133, %127 ]
  %136 = zext i1 %135 to i32
  %137 = load i32, ptr %16, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [200000 x i32], ptr @oz, i64 0, i64 %138
  store i32 %136, ptr %139, align 4, !tbaa !8
  %140 = load i32, ptr %16, align 4, !tbaa !8
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %141
  %143 = getelementptr inbounds [3 x i32], ptr %142, i64 0, i64 1
  %144 = load i32, ptr %143, align 4, !tbaa !8
  %145 = icmp eq i32 %144, 0
  br i1 %145, label %146, label %153

146:                                              ; preds = %134
  %147 = load i32, ptr %16, align 4, !tbaa !8
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %148
  %150 = getelementptr inbounds [3 x i32], ptr %149, i64 0, i64 2
  %151 = load i32, ptr %150, align 4, !tbaa !8
  %152 = icmp eq i32 %151, 1
  br label %153

153:                                              ; preds = %146, %134
  %154 = phi i1 [ false, %134 ], [ %152, %146 ]
  %155 = zext i1 %154 to i32
  %156 = load i32, ptr %16, align 4, !tbaa !8
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [200000 x i32], ptr @zo, i64 0, i64 %157
  store i32 %155, ptr %158, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %159 = load i32, ptr %16, align 4, !tbaa !8
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %160
  store ptr %161, ptr %18, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %162 = load ptr, ptr %18, align 8, !tbaa !16
  %163 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %162) #7
  %164 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %163, ptr %164, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %165 = load ptr, ptr %18, align 8, !tbaa !16
  %166 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #7
  %167 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %166, ptr %167, align 8
  br label %168

168:                                              ; preds = %187, %153
  %169 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br i1 %169, label %171, label %170

170:                                              ; preds = %168
  store i32 13, ptr %12, align 4
  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 %189

171:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  %173 = load i32, ptr %172, align 4, !tbaa !8
  store i32 %173, ptr %21, align 4, !tbaa !8
  %174 = load i32, ptr %21, align 4, !tbaa !8
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [200000 x i32], ptr @depth, i64 0, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !8
  %178 = load i32, ptr %11, align 4, !tbaa !8
  %179 = icmp sgt i32 %177, %178
  br i1 %179, label %180, label %186

180:                                              ; preds = %171
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %181 unwind label %182

181:                                              ; preds = %180
  br label %186

182:                                              ; preds = %180
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %22, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  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 %265

186:                                              ; preds = %181, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %187

187:                                              ; preds = %186
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %168

189:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store ptr %17, ptr %24, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %190 = load ptr, ptr %24, align 8, !tbaa !16
  %191 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %190) #7
  %192 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %191, ptr %192, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %193 = load ptr, ptr %24, align 8, !tbaa !16
  %194 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %193) #7
  %195 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %194, ptr %195, align 8
  br label %196

196:                                              ; preds = %220, %189
  %197 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  br i1 %197, label %199, label %198

198:                                              ; preds = %196
  store i32 15, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %222

199:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %200 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  %201 = load i32, ptr %200, align 4, !tbaa !8
  store i32 %201, ptr %27, align 4, !tbaa !8
  %202 = load i32, ptr %27, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [200000 x i32], ptr @oz, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !8
  %206 = load i32, ptr %16, align 4, !tbaa !8
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [200000 x i32], ptr @oz, i64 0, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !8
  %210 = add nsw i32 %209, %205
  store i32 %210, ptr %208, align 4, !tbaa !8
  %211 = load i32, ptr %27, align 4, !tbaa !8
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [200000 x i32], ptr @zo, i64 0, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !8
  %215 = load i32, ptr %16, align 4, !tbaa !8
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [200000 x i32], ptr @zo, i64 0, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !8
  %219 = add nsw i32 %218, %214
  store i32 %219, ptr %217, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %220

220:                                              ; preds = %199
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  br label %196

222:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %223 = load i32, ptr %16, align 4, !tbaa !8
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [200000 x i32], ptr @oz, i64 0, i64 %224
  %226 = load i32, ptr %16, align 4, !tbaa !8
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [200000 x i32], ptr @zo, i64 0, i64 %227
  %229 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %225, ptr noundef nonnull align 4 dereferenceable(4) %228)
          to label %230 unwind label %261

230:                                              ; preds = %222
  %231 = load i32, ptr %229, align 4, !tbaa !8
  %232 = sext i32 %231 to i64
  store i64 %232, ptr %28, align 8, !tbaa !14
  %233 = load i64, ptr %28, align 8, !tbaa !14
  %234 = mul nsw i64 2, %233
  %235 = load i32, ptr %16, align 4, !tbaa !8
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [200000 x i32], ptr @costs, i64 0, i64 %236
  %238 = load i32, ptr %237, align 4, !tbaa !8
  %239 = sext i32 %238 to i64
  %240 = mul nsw i64 %234, %239
  %241 = load i64, ptr %10, align 8, !tbaa !14
  %242 = add nsw i64 %241, %240
  store i64 %242, ptr %10, align 8, !tbaa !14
  %243 = load i64, ptr %28, align 8, !tbaa !14
  %244 = load i32, ptr %16, align 4, !tbaa !8
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [200000 x i32], ptr @oz, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !8
  %248 = sext i32 %247 to i64
  %249 = sub nsw i64 %248, %243
  %250 = trunc i64 %249 to i32
  store i32 %250, ptr %246, align 4, !tbaa !8
  %251 = load i64, ptr %28, align 8, !tbaa !14
  %252 = load i32, ptr %16, align 4, !tbaa !8
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [200000 x i32], ptr @zo, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !8
  %256 = sext i32 %255 to i64
  %257 = sub nsw i64 %256, %251
  %258 = trunc i64 %257 to i32
  store i32 %258, ptr %254, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %259

259:                                              ; preds = %230
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %115

261:                                              ; preds = %222
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %22, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %265

265:                                              ; preds = %261, %182
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %285

266:                                              ; preds = %117
  br label %267

267:                                              ; preds = %266, %104
  %268 = load i32, ptr %11, align 4, !tbaa !8
  %269 = add nsw i32 %268, -1
  store i32 %269, ptr %11, align 4, !tbaa !8
  br label %94, !llvm.loop !18

270:                                              ; preds = %97
  %271 = load i32, ptr @oz, align 16, !tbaa !8
  %272 = icmp ne i32 %271, 0
  br i1 %272, label %276, label %273

273:                                              ; preds = %270
  %274 = load i32, ptr @zo, align 16, !tbaa !8
  %275 = icmp ne i32 %274, 0
  br i1 %275, label %276, label %279

276:                                              ; preds = %273, %270
  %277 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %278 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %277, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %283

279:                                              ; preds = %273
  %280 = load i64, ptr %10, align 8, !tbaa !14
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %280)
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %281, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %283

283:                                              ; preds = %279, %276
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %284 = load i32, ptr %1, align 4
  ret i32 %284

285:                                              ; preds = %265
  %286 = load ptr, ptr %22, align 8
  %287 = load i32, ptr %23, align 4
  %288 = insertvalue { ptr, i32 } poison, ptr %286, 0
  %289 = insertvalue { ptr, i32 } %288, i32 %287, 1
  resume { ptr, i32 } %289
}

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

; 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 nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !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 = !{!"long long", !10, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !10, i64 0}
!18 = distinct !{!18, !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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@nodes = external dso_local global [200000 x [3 x i32]], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@costs = external dso_local global [200000 x i32], align 16
@depth = external dso_local global [200000 x i32], align 16
@revdepth = external dso_local global [200000 x %"class.std::vector"], align 16
@zo = external dso_local global [200000 x i32], align 16
@oz = external dso_local global [200000 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9dfs_costsii(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(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_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9dfs_depthii(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

.preheader:                                       ; preds = %.lr.ph
  %24 = icmp sgt i32 %31, 1
  br i1 %24, label %.lr.ph49, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %25 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %indvars.iv
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %27 = getelementptr inbounds i8, ptr %25, i64 4
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %29 = getelementptr inbounds i8, ptr %25, i64 8
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr @N, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %.preheader, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph49, %0, %.preheader
  %.lcssa = phi i32 [ %31, %.preheader ], [ %22, %0 ], [ %57, %.lr.ph49 ]
  %34 = sext i32 %.lcssa to i64
  %35 = getelementptr inbounds i32, ptr @costs, i64 %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 -1, ptr %5, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @costs, ptr noundef nonnull %35, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @_Z9dfs_costsii(i32 noundef 0, i32 noundef 2147483647)
  %36 = load i32, ptr @N, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr @depth, i64 %37
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 -1, ptr %6, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @depth, ptr noundef nonnull %38, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @_Z9dfs_depthii(i32 noundef 0, i32 noundef 0)
  %39 = load i32, ptr @N, align 4, !tbaa !8
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %.lr.ph66.preheader, label %._crit_edge67

.lr.ph66.preheader:                               ; preds = %._crit_edge
  %41 = zext nneg i32 %39 to i64
  br label %.lr.ph66

.lr.ph49:                                         ; preds = %.preheader, %.lr.ph49
  %.04248 = phi i32 [ %56, %.lr.ph49 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %44 = load i32, ptr %1, align 4, !tbaa !8
  %45 = add nsw i32 %44, -1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %46
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %48 = load i32, ptr %2, align 4, !tbaa !8
  %49 = add nsw i32 %48, -1
  store i32 %49, ptr %3, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %50 = load i32, ptr %2, align 4, !tbaa !8
  %51 = add nsw i32 %50, -1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %54 = load i32, ptr %1, align 4, !tbaa !8
  %55 = add nsw i32 %54, -1
  store i32 %55, ptr %4, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %56 = add nuw nsw i32 %.04248, 1
  %57 = load i32, ptr @N, align 4, !tbaa !8
  %58 = add nsw i32 %57, -1
  %59 = icmp slt i32 %56, %58
  br i1 %59, label %.lr.ph49, label %._crit_edge, !llvm.loop !13

._crit_edge67:                                    ; preds = %142, %._crit_edge
  %.043.lcssa = phi i64 [ 0, %._crit_edge ], [ %.2, %142 ]
  %60 = load i32, ptr @oz, align 16, !tbaa !8
  %61 = icmp ne i32 %60, 0
  %62 = load i32, ptr @zo, align 16
  %63 = icmp ne i32 %62, 0
  %or.cond = select i1 %61, i1 true, i1 %63
  br i1 %or.cond, label %144, label %146

.lr.ph66:                                         ; preds = %.lr.ph66.preheader, %142
  %indvars.iv72 = phi i64 [ %41, %.lr.ph66.preheader ], [ %indvars.iv.next73, %142 ]
  %.04363 = phi i64 [ 0, %.lr.ph66.preheader ], [ %.2, %142 ]
  %indvars.iv.next73 = add nsw i64 %indvars.iv72, -1
  %64 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @revdepth, i64 0, i64 %indvars.iv.next73
  %65 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #7
  %66 = icmp eq i64 %65, 0
  br i1 %66, label %142, label %67

67:                                               ; preds = %.lr.ph66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %68 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #7
  store ptr %68, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %69 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #7
  store ptr %69, ptr %8, align 8
  %70 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %70, label %.lr.ph58, label %._crit_edge59

._crit_edge59:                                    ; preds = %._crit_edge55, %67
  %.1.lcssa = phi i64 [ %.04363, %67 ], [ %122, %._crit_edge55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %142

.lr.ph58:                                         ; preds = %67, %._crit_edge55
  %.156 = phi i64 [ %122, %._crit_edge55 ], [ %.04363, %67 ]
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %72 = load i32, ptr %71, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [200000 x [3 x i32]], ptr @nodes, i64 0, i64 %73
  %75 = getelementptr inbounds i8, ptr %74, i64 4
  %76 = load i32, ptr %75, align 4, !tbaa !8
  %77 = icmp eq i32 %76, 1
  br i1 %77, label %.thread, label %83

.thread:                                          ; preds = %.lr.ph58
  %78 = getelementptr inbounds i8, ptr %74, i64 8
  %79 = load i32, ptr %78, align 4, !tbaa !8
  %80 = icmp eq i32 %79, 0
  %81 = zext i1 %80 to i32
  %82 = getelementptr inbounds [200000 x i32], ptr @oz, i64 0, i64 %73
  store i32 %81, ptr %82, align 4, !tbaa !8
  br label %90

83:                                               ; preds = %.lr.ph58
  %84 = getelementptr inbounds [200000 x i32], ptr @oz, i64 0, i64 %73
  store i32 0, ptr %84, align 4, !tbaa !8
  %85 = icmp eq i32 %76, 0
  br i1 %85, label %86, label %90

86:                                               ; preds = %83
  %87 = getelementptr inbounds i8, ptr %74, i64 8
  %88 = load i32, ptr %87, align 4, !tbaa !8
  %89 = icmp eq i32 %88, 1
  br label %90

90:                                               ; preds = %.thread, %86, %83
  %91 = phi ptr [ %84, %83 ], [ %84, %86 ], [ %82, %.thread ]
  %92 = phi i1 [ false, %83 ], [ %89, %86 ], [ false, %.thread ]
  %93 = zext i1 %92 to i32
  %94 = getelementptr inbounds [200000 x i32], ptr @zo, i64 0, i64 %73
  store i32 %93, ptr %94, align 4, !tbaa !8
  %95 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %73
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %96 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %95) #7
  store ptr %96, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %97 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %95) #7
  store ptr %97, ptr %11, align 8
  %98 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %98, label %.lr.ph51, label %._crit_edge52

._crit_edge52:                                    ; preds = %111, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %99 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  store ptr %99, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %100 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  store ptr %100, ptr %14, align 8
  %101 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br i1 %101, label %.lr.ph54, label %._crit_edge55

.lr.ph51:                                         ; preds = %90, %111
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %103 = load i32, ptr %102, align 4, !tbaa !8
  store i32 %103, ptr %12, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [200000 x i32], ptr @depth, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !8
  %107 = sext i32 %106 to i64
  %.not = icmp sgt i64 %indvars.iv72, %107
  br i1 %.not, label %111, label %108

108:                                              ; preds = %.lr.ph51
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %111 unwind label %109

109:                                              ; preds = %108
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  resume { ptr, i32 } %110

111:                                              ; preds = %108, %.lr.ph51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %113 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %113, label %.lr.ph51, label %._crit_edge52

._crit_edge55:                                    ; preds = %.lr.ph54, %._crit_edge52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %91, ptr noundef nonnull align 4 dereferenceable(4) %94)
  %115 = load i32, ptr %114, align 4, !tbaa !8
  %116 = sext i32 %115 to i64
  %117 = shl nsw i64 %116, 1
  %118 = getelementptr inbounds [200000 x i32], ptr @costs, i64 0, i64 %73
  %119 = load i32, ptr %118, align 4, !tbaa !8
  %120 = sext i32 %119 to i64
  %121 = mul nsw i64 %117, %120
  %122 = add nsw i64 %121, %.156
  %123 = load i32, ptr %91, align 4, !tbaa !8
  %124 = sub i32 %123, %115
  store i32 %124, ptr %91, align 4, !tbaa !8
  %125 = load i32, ptr %94, align 4, !tbaa !8
  %126 = sub i32 %125, %115
  store i32 %126, ptr %94, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %128 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %128, label %.lr.ph58, label %._crit_edge59

.lr.ph54:                                         ; preds = %._crit_edge52, %.lr.ph54
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %130 = load i32, ptr %129, align 4, !tbaa !8
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [200000 x i32], ptr @oz, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !8
  %134 = load i32, ptr %91, align 4, !tbaa !8
  %135 = add nsw i32 %134, %133
  store i32 %135, ptr %91, align 4, !tbaa !8
  %136 = getelementptr inbounds [200000 x i32], ptr @zo, i64 0, i64 %131
  %137 = load i32, ptr %136, align 4, !tbaa !8
  %138 = load i32, ptr %94, align 4, !tbaa !8
  %139 = add nsw i32 %138, %137
  store i32 %139, ptr %94, align 4, !tbaa !8
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %141 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br i1 %141, label %.lr.ph54, label %._crit_edge55

142:                                              ; preds = %.lr.ph66, %._crit_edge59
  %.2 = phi i64 [ %.04363, %.lr.ph66 ], [ %.1.lcssa, %._crit_edge59 ]
  %143 = icmp sgt i64 %indvars.iv72, 1
  br i1 %143, label %.lr.ph66, label %._crit_edge67, !llvm.loop !14

144:                                              ; preds = %._crit_edge67
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %148

146:                                              ; preds = %._crit_edge67
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.043.lcssa)
  br label %148

148:                                              ; preds = %146, %144
  %.sink = phi ptr [ %147, %146 ], [ %145, %144 ]
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

; 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 nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: 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

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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


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