; LLVM IR from HarshCasper/NeoAlgo :: C-Plus-Plus/graphs/Tarjan's_Algorithm.ll (Z3dfsx)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@graph = external dso_local global [100001 x %"class.std::vector"], align 16
@vis = external dso_local global [100001 x i8], align 16
@onstack = external dso_local global [100001 x i8], align 16
@in = external dso_local global [100001 x i64], align 16
@low = external dso_local global [100001 x i64], align 16
@st = external dso_local global %"class.std::stack", align 8
@timer = external dso_local global i64, align 8
@scc = external dso_local global i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsx(i64 noundef %0) #0 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  store i64 %0, ptr %2, align 8, !tbaa !5
  %8 = load i64, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %8
  store i8 1, ptr %9, align 1, !tbaa !9
  %10 = load i64, ptr @timer, align 8, !tbaa !5
  %11 = add nsw i64 %10, 1
  store i64 %11, ptr @timer, align 8, !tbaa !5
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %12
  store i64 %10, ptr %13, align 8, !tbaa !5
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %14
  store i64 %10, ptr %15, align 8, !tbaa !5
  %16 = load i64, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds [100001 x i8], ptr @onstack, i64 0, i64 %16
  store i8 1, ptr %17, align 1, !tbaa !9
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80) @st, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %18 = load i64, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @graph, i64 0, i64 %18
  store ptr %19, ptr %3, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %20 = load ptr, ptr %3, align 8, !tbaa !11
  %21 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %21, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %23 = load ptr, ptr %3, align 8, !tbaa !11
  %24 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  br label %26

26:                                               ; preds = %81, %1
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %27, label %29, label %28

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %83

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %31 = load i64, ptr %30, align 8, !tbaa !5
  store i64 %31, ptr %6, align 8, !tbaa !5
  %32 = load i64, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %32
  %34 = load i8, ptr %33, align 1, !tbaa !9, !range !13, !noundef !14
  %35 = trunc i8 %34 to i1
  %36 = zext i1 %35 to i32
  %37 = icmp eq i32 %36, 1
  br i1 %37, label %38, label %54

38:                                               ; preds = %29
  %39 = load i64, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds [100001 x i8], ptr @onstack, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !9, !range !13, !noundef !14
  %42 = trunc i8 %41 to i1
  %43 = zext i1 %42 to i32
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %54

45:                                               ; preds = %38
  %46 = load i64, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %46
  %48 = load i64, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %48
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %49)
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = load i64, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %52
  store i64 %51, ptr %53, align 8, !tbaa !5
  br label %80

54:                                               ; preds = %38, %29
  %55 = load i64, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !9, !range !13, !noundef !14
  %58 = trunc i8 %57 to i1
  %59 = zext i1 %58 to i32
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %79

61:                                               ; preds = %54
  %62 = load i64, ptr %6, align 8, !tbaa !5
  call void @_Z3dfsx(i64 noundef %62)
  %63 = load i64, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds [100001 x i8], ptr @onstack, i64 0, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !9, !range !13, !noundef !14
  %66 = trunc i8 %65 to i1
  %67 = zext i1 %66 to i32
  %68 = icmp eq i32 %67, 1
  br i1 %68, label %69, label %78

69:                                               ; preds = %61
  %70 = load i64, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %70
  %72 = load i64, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %72
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull align 8 dereferenceable(8) %73)
  %75 = load i64, ptr %74, align 8, !tbaa !5
  %76 = load i64, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %76
  store i64 %75, ptr %77, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %69, %61
  br label %79

79:                                               ; preds = %78, %54
  br label %80

80:                                               ; preds = %79, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %81

81:                                               ; preds = %80
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %26

83:                                               ; preds = %28
  %84 = load i64, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !5
  %87 = load i64, ptr %2, align 8, !tbaa !5
  %88 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = icmp eq i64 %86, %89
  br i1 %90, label %91, label %114

91:                                               ; preds = %83
  %92 = load i64, ptr @scc, align 8, !tbaa !5
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr @scc, align 8, !tbaa !5
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %95 = load i64, ptr @scc, align 8, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %94, i64 noundef %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  br label %98

98:                                               ; preds = %111, %91
  br label %99

99:                                               ; preds = %98
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @st)
  %101 = load i64, ptr %100, align 8, !tbaa !5
  store i64 %101, ptr %7, align 8, !tbaa !5
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @st)
  %102 = load i64, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds [100001 x i8], ptr @onstack, i64 0, i64 %102
  store i8 0, ptr %103, align 1, !tbaa !9
  %104 = load i64, ptr %7, align 8, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %104)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @.str.4)
  %107 = load i64, ptr %7, align 8, !tbaa !5
  %108 = load i64, ptr %2, align 8, !tbaa !5
  %109 = icmp eq i64 %107, %108
  br i1 %109, label %110, label %111

110:                                              ; preds = %99
  br label %112

111:                                              ; preds = %99
  br label %98, !llvm.loop !15

112:                                              ; preds = %110
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %114

114:                                              ; preds = %112, %83
  ret void
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@graph = external dso_local global [100001 x %"class.std::vector"], align 16
@vis = external dso_local local_unnamed_addr global [100001 x i8], align 16
@onstack = external dso_local local_unnamed_addr global [100001 x i8], align 16
@in = external dso_local global [100001 x i64], align 16
@low = external dso_local global [100001 x i64], align 16
@st = external dso_local global %"class.std::stack", align 8
@timer = external dso_local local_unnamed_addr global i64, align 8
@scc = external dso_local local_unnamed_addr global i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsx(i64 noundef %0) local_unnamed_addr #0 {
  %2 = alloca i64, align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i64 %0, ptr %2, align 8, !tbaa !5
  %5 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %0
  store i8 1, ptr %5, align 1, !tbaa !9
  %6 = load i64, ptr @timer, align 8, !tbaa !5
  %7 = add nsw i64 %6, 1
  store i64 %7, ptr @timer, align 8, !tbaa !5
  %8 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %0
  store i64 %6, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %0
  store i64 %6, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds [100001 x i8], ptr @onstack, i64 0, i64 %0
  store i8 1, ptr %10, align 1, !tbaa !9
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80) @st, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %11 = load i64, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @graph, i64 0, i64 %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %13 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  store ptr %13, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %14 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  store ptr %14, ptr %4, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %41, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %16 = load i64, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %16
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %16
  %20 = load i64, ptr %19, align 8, !tbaa !5
  %21 = icmp eq i64 %18, %20
  br i1 %21, label %44, label %61

.lr.ph:                                           ; preds = %1, %41
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !9, !range !11, !noundef !12
  %26 = trunc nuw i8 %25 to i1
  br i1 %26, label %27, label %31

27:                                               ; preds = %.lr.ph
  %28 = getelementptr inbounds [100001 x i8], ptr @onstack, i64 0, i64 %23
  %29 = load i8, ptr %28, align 1, !tbaa !9, !range !11, !noundef !12
  %30 = trunc nuw i8 %29 to i1
  br i1 %30, label %.sink.split, label %31

31:                                               ; preds = %27, %.lr.ph
  %32 = icmp eq i8 %25, 0
  br i1 %32, label %33, label %41

33:                                               ; preds = %31
  call void @_Z3dfsx(i64 noundef %23)
  %34 = getelementptr inbounds [100001 x i8], ptr @onstack, i64 0, i64 %23
  %35 = load i8, ptr %34, align 1, !tbaa !9, !range !11, !noundef !12
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %.sink.split, label %41

.sink.split:                                      ; preds = %33, %27
  %in.sink = phi ptr [ @in, %27 ], [ @low, %33 ]
  %.sink15 = load i64, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %.sink15
  %38 = getelementptr inbounds [100001 x i64], ptr %in.sink, i64 0, i64 %23
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38)
  %.sink = load i64, ptr %39, align 8, !tbaa !5
  %.sink12 = load i64, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %.sink12
  store i64 %.sink, ptr %40, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %.sink.split, %31, %33
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %43, label %.lr.ph, label %._crit_edge

44:                                               ; preds = %._crit_edge
  %45 = load i64, ptr @scc, align 8, !tbaa !5
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr @scc, align 8, !tbaa !5
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %48 = load i64, ptr @scc, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %47, i64 noundef %48)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @.str.3)
  br label %51

51:                                               ; preds = %51, %44
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @st)
  %53 = load i64, ptr %52, align 8, !tbaa !5
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @st)
  %54 = getelementptr inbounds [100001 x i8], ptr @onstack, i64 0, i64 %53
  store i8 0, ptr %54, align 1, !tbaa !9
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %53)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @.str.4)
  %57 = load i64, ptr %2, align 8, !tbaa !5
  %58 = icmp eq i64 %53, %57
  br i1 %58, label %59, label %51, !llvm.loop !13

59:                                               ; preds = %51
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  br label %61

61:                                               ; preds = %59, %._crit_edge
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80), 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.start.p0(i64 immarg, ptr nocapture) #1

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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