; LLVM IR from UtkarshPathrabe/Competitive-Coding :: Model Algorithms/Graphs/Depth First Search.ll (Z10DFSUtilityiRSt6vectorI5NodesSaIS0_EE)

; 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Edges, std::allocator<Edges>>::_Vector_impl" }
%"struct.std::_Vector_base<Edges, std::allocator<Edges>>::_Vector_impl" = type { %"struct.std::_Vector_base<Edges, std::allocator<Edges>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Edges, std::allocator<Edges>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" }
%"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { 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 }
%struct.Nodes = type { i8, i32, i32, i32, i32, i32 }
%struct.Edges = type { i32, i32, i8 }

@Edge = external dso_local global %"class.std::vector.0", align 8
@_Z5StackB5cxx11 = external dso_local global %"class.std::__cxx11::list", align 8
@timer = external dso_local global i32, align 4
@c = external dso_local global i8, align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10DFSUtilityiRSt6vectorI5NodesSaIS0_EE(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  %6 = load ptr, ptr %4, align 8, !tbaa !9
  %7 = load i32, ptr %3, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #5
  %10 = getelementptr inbounds %struct.Nodes, ptr %9, i32 0, i32 0
  store i8 103, ptr %10, align 4, !tbaa !11
  %11 = load i32, ptr @timer, align 4, !tbaa !5
  %12 = add nsw i32 %11, 1
  store i32 %12, ptr @timer, align 4, !tbaa !5
  %13 = load ptr, ptr %4, align 8, !tbaa !9
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %15) #5
  %17 = getelementptr inbounds %struct.Nodes, ptr %16, i32 0, i32 3
  store i32 %12, ptr %17, align 4, !tbaa !13
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %18)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef @.str)
  %21 = load ptr, ptr %4, align 8, !tbaa !9
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %23) #5
  %25 = getelementptr inbounds %struct.Nodes, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 4, !tbaa !14
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %20, i32 noundef %26)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef @.str.4)
  %29 = load ptr, ptr %4, align 8, !tbaa !9
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %31) #5
  %33 = getelementptr inbounds %struct.Nodes, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 4, !tbaa !15
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef %34)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef @.str.5)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @.str.6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %38 = load ptr, ptr %4, align 8, !tbaa !9
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40) #5
  %42 = getelementptr inbounds %struct.Nodes, ptr %41, i32 0, i32 5
  %43 = load i32, ptr %42, align 4, !tbaa !16
  store i32 %43, ptr %5, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %171, %2
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = icmp ne i32 %45, -1
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %177

48:                                               ; preds = %44
  %49 = load ptr, ptr %4, align 8, !tbaa !9
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %51) #5
  %53 = getelementptr inbounds %struct.Edges, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !17
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %55) #5
  %57 = getelementptr inbounds %struct.Nodes, ptr %56, i32 0, i32 0
  %58 = load i8, ptr %57, align 4, !tbaa !11
  %59 = sext i8 %58 to i32
  %60 = icmp eq i32 %59, 119
  br i1 %60, label %61, label %98

61:                                               ; preds = %48
  %62 = load ptr, ptr %4, align 8, !tbaa !9
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64) #5
  %66 = getelementptr inbounds %struct.Nodes, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !14
  %68 = add nsw i32 %67, 1
  %69 = load ptr, ptr %4, align 8, !tbaa !9
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %71) #5
  %73 = getelementptr inbounds %struct.Edges, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !17
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %75) #5
  %77 = getelementptr inbounds %struct.Nodes, ptr %76, i32 0, i32 1
  store i32 %68, ptr %77, align 4, !tbaa !14
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = load ptr, ptr %4, align 8, !tbaa !9
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %81) #5
  %83 = getelementptr inbounds %struct.Edges, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 4, !tbaa !17
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %85) #5
  %87 = getelementptr inbounds %struct.Nodes, ptr %86, i32 0, i32 2
  store i32 %78, ptr %87, align 4, !tbaa !15
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %89) #5
  %91 = getelementptr inbounds %struct.Edges, ptr %90, i32 0, i32 2
  store i8 116, ptr %91, align 4, !tbaa !19
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %93) #5
  %95 = getelementptr inbounds %struct.Edges, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 4, !tbaa !17
  %97 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_Z10DFSUtilityiRSt6vectorI5NodesSaIS0_EE(i32 noundef %96, ptr noundef nonnull align 8 dereferenceable(24) %97)
  br label %170

98:                                               ; preds = %48
  %99 = load ptr, ptr %4, align 8, !tbaa !9
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %101) #5
  %103 = getelementptr inbounds %struct.Edges, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 4, !tbaa !17
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %105) #5
  %107 = getelementptr inbounds %struct.Nodes, ptr %106, i32 0, i32 0
  %108 = load i8, ptr %107, align 4, !tbaa !11
  %109 = sext i8 %108 to i32
  %110 = icmp eq i32 %109, 103
  br i1 %110, label %111, label %116

111:                                              ; preds = %98
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %113) #5
  %115 = getelementptr inbounds %struct.Edges, ptr %114, i32 0, i32 2
  store i8 98, ptr %115, align 4, !tbaa !19
  br label %169

116:                                              ; preds = %98
  %117 = load i8, ptr @c, align 1, !tbaa !20
  %118 = sext i8 %117 to i32
  %119 = icmp eq i32 %118, 100
  br i1 %119, label %120, label %168

120:                                              ; preds = %116
  %121 = load ptr, ptr %4, align 8, !tbaa !9
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123) #5
  %125 = getelementptr inbounds %struct.Nodes, ptr %124, i32 0, i32 3
  %126 = load i32, ptr %125, align 4, !tbaa !13
  %127 = load ptr, ptr %4, align 8, !tbaa !9
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %129) #5
  %131 = getelementptr inbounds %struct.Edges, ptr %130, i32 0, i32 0
  %132 = load i32, ptr %131, align 4, !tbaa !17
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %133) #5
  %135 = getelementptr inbounds %struct.Nodes, ptr %134, i32 0, i32 3
  %136 = load i32, ptr %135, align 4, !tbaa !13
  %137 = icmp slt i32 %126, %136
  br i1 %137, label %138, label %143

138:                                              ; preds = %120
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %140) #5
  %142 = getelementptr inbounds %struct.Edges, ptr %141, i32 0, i32 2
  store i8 102, ptr %142, align 4, !tbaa !19
  br label %167

143:                                              ; preds = %120
  %144 = load ptr, ptr %4, align 8, !tbaa !9
  %145 = load i32, ptr %3, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %146) #5
  %148 = getelementptr inbounds %struct.Nodes, ptr %147, i32 0, i32 3
  %149 = load i32, ptr %148, align 4, !tbaa !13
  %150 = load ptr, ptr %4, align 8, !tbaa !9
  %151 = load i32, ptr %5, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %152) #5
  %154 = getelementptr inbounds %struct.Edges, ptr %153, i32 0, i32 0
  %155 = load i32, ptr %154, align 4, !tbaa !17
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %150, i64 noundef %156) #5
  %158 = getelementptr inbounds %struct.Nodes, ptr %157, i32 0, i32 3
  %159 = load i32, ptr %158, align 4, !tbaa !13
  %160 = icmp sgt i32 %149, %159
  br i1 %160, label %161, label %166

161:                                              ; preds = %143
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %163) #5
  %165 = getelementptr inbounds %struct.Edges, ptr %164, i32 0, i32 2
  store i8 99, ptr %165, align 4, !tbaa !19
  br label %166

166:                                              ; preds = %161, %143
  br label %167

167:                                              ; preds = %166, %138
  br label %168

168:                                              ; preds = %167, %116
  br label %169

169:                                              ; preds = %168, %111
  br label %170

170:                                              ; preds = %169, %61
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %173) #5
  %175 = getelementptr inbounds %struct.Edges, ptr %174, i32 0, i32 1
  %176 = load i32, ptr %175, align 4, !tbaa !21
  store i32 %176, ptr %5, align 4, !tbaa !5
  br label %44, !llvm.loop !22

177:                                              ; preds = %47
  %178 = load ptr, ptr %4, align 8, !tbaa !9
  %179 = load i32, ptr %3, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %180) #5
  %182 = getelementptr inbounds %struct.Nodes, ptr %181, i32 0, i32 0
  store i8 98, ptr %182, align 4, !tbaa !11
  %183 = load i32, ptr @timer, align 4, !tbaa !5
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr @timer, align 4, !tbaa !5
  %185 = load ptr, ptr %4, align 8, !tbaa !9
  %186 = load i32, ptr %3, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %185, i64 noundef %187) #5
  %189 = getelementptr inbounds %struct.Nodes, ptr %188, i32 0, i32 4
  store i32 %184, ptr %189, align 4, !tbaa !24
  call void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @_Z5StackB5cxx11, ptr noundef nonnull align 4 dereferenceable(4) %3)
  ret void
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

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

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

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


; 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Edges, std::allocator<Edges>>::_Vector_impl" }
%"struct.std::_Vector_base<Edges, std::allocator<Edges>>::_Vector_impl" = type { %"struct.std::_Vector_base<Edges, std::allocator<Edges>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Edges, std::allocator<Edges>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" }
%"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { 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 }

@Edge = external dso_local global %"class.std::vector.0", align 8
@_Z5StackB5cxx11 = external dso_local global %"class.std::__cxx11::list", align 8
@timer = external dso_local local_unnamed_addr global i32, align 4
@c = external dso_local local_unnamed_addr global i8, align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10DFSUtilityiRSt6vectorI5NodesSaIS0_EE(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %4 = sext i32 %0 to i64
  %5 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  store i8 103, ptr %5, align 4, !tbaa !9
  %6 = load i32, ptr @timer, align 4, !tbaa !5
  %7 = add nsw i32 %6, 1
  store i32 %7, ptr @timer, align 4, !tbaa !5
  %8 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  %9 = getelementptr inbounds i8, ptr %8, i64 12
  store i32 %7, ptr %9, align 4, !tbaa !11
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %0)
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull @.str)
  %12 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  %13 = getelementptr inbounds i8, ptr %12, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !12
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %14)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @.str.4)
  %17 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  %19 = load i32, ptr %18, align 4, !tbaa !13
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef %19)
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.5)
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @.str.6)
  %23 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  %24 = getelementptr inbounds i8, ptr %23, i64 20
  %.029 = load i32, ptr %24, align 4, !tbaa !5
  %.not30 = icmp eq i32 %.029, -1
  br i1 %.not30, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %97, %2
  %25 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  store i8 98, ptr %25, align 4, !tbaa !9
  %26 = load i32, ptr @timer, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr @timer, align 4, !tbaa !5
  %28 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  store i32 %27, ptr %29, align 4, !tbaa !14
  call void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @_Z5StackB5cxx11, ptr noundef nonnull align 4 dereferenceable(4) %3)
  ret void

.lr.ph:                                           ; preds = %2, %97
  %.031 = phi i32 [ %.0, %97 ], [ %.029, %2 ]
  %30 = sext i32 %.031 to i64
  %31 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %32 = load i32, ptr %31, align 4, !tbaa !15
  %33 = sext i32 %32 to i64
  %34 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %33) #4
  %35 = load i8, ptr %34, align 4, !tbaa !9
  %36 = icmp eq i8 %35, 119
  br i1 %36, label %37, label %56

37:                                               ; preds = %.lr.ph
  %38 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  %39 = getelementptr inbounds i8, ptr %38, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !12
  %41 = add nsw i32 %40, 1
  %42 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %43 = load i32, ptr %42, align 4, !tbaa !15
  %44 = sext i32 %43 to i64
  %45 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %44) #4
  %46 = getelementptr inbounds i8, ptr %45, i64 4
  store i32 %41, ptr %46, align 4, !tbaa !12
  %47 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %48 = load i32, ptr %47, align 4, !tbaa !15
  %49 = sext i32 %48 to i64
  %50 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %49) #4
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  store i32 %0, ptr %51, align 4, !tbaa !13
  %52 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  store i8 116, ptr %53, align 4, !tbaa !17
  %54 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %55 = load i32, ptr %54, align 4, !tbaa !15
  tail call void @_Z10DFSUtilityiRSt6vectorI5NodesSaIS0_EE(i32 noundef %55, ptr noundef nonnull align 8 dereferenceable(24) %1)
  br label %97

56:                                               ; preds = %.lr.ph
  %57 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %58 = load i32, ptr %57, align 4, !tbaa !15
  %59 = sext i32 %58 to i64
  %60 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %59) #4
  %61 = load i8, ptr %60, align 4, !tbaa !9
  %62 = icmp eq i8 %61, 103
  br i1 %62, label %63, label %66

63:                                               ; preds = %56
  %64 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  store i8 98, ptr %65, align 4, !tbaa !17
  br label %97

66:                                               ; preds = %56
  %67 = load i8, ptr @c, align 1, !tbaa !18
  %68 = icmp eq i8 %67, 100
  br i1 %68, label %69, label %97

69:                                               ; preds = %66
  %70 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  %71 = getelementptr inbounds i8, ptr %70, i64 12
  %72 = load i32, ptr %71, align 4, !tbaa !11
  %73 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %74 = load i32, ptr %73, align 4, !tbaa !15
  %75 = sext i32 %74 to i64
  %76 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %75) #4
  %77 = getelementptr inbounds i8, ptr %76, i64 12
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = icmp slt i32 %72, %78
  br i1 %79, label %80, label %83

80:                                               ; preds = %69
  %81 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  store i8 102, ptr %82, align 4, !tbaa !17
  br label %97

83:                                               ; preds = %69
  %84 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %4) #4
  %85 = getelementptr inbounds i8, ptr %84, i64 12
  %86 = load i32, ptr %85, align 4, !tbaa !11
  %87 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %88 = load i32, ptr %87, align 4, !tbaa !15
  %89 = sext i32 %88 to i64
  %90 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorI5NodesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %89) #4
  %91 = getelementptr inbounds i8, ptr %90, i64 12
  %92 = load i32, ptr %91, align 4, !tbaa !11
  %93 = icmp sgt i32 %86, %92
  br i1 %93, label %94, label %97

94:                                               ; preds = %83
  %95 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  store i8 99, ptr %96, align 4, !tbaa !17
  br label %97

97:                                               ; preds = %37, %66, %83, %94, %80, %63
  %98 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI5EdgesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Edge, i64 noundef %30) #4
  %99 = getelementptr inbounds i8, ptr %98, i64 4
  %.0 = load i32, ptr %99, align 4, !tbaa !5
  %.not = icmp eq i32 %.0, -1
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !19
}

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { 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 #3 = { "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 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass