; LLVM IR from HarshCasper/NeoAlgo :: C-Plus-Plus/graphs/Articulation_points.ll (Z3dfsxx)

; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_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
@in = external dso_local global [100001 x i64], align 16
@low = external dso_local global [100001 x i64], align 16
@timer = external dso_local global i64, align 8
@cut_vertices = external dso_local global %"class.std::set", align 8

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

30:                                               ; preds = %90, %2
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %31, label %33, label %32

32:                                               ; preds = %30
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %92

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %35 = load i64, ptr %34, align 8, !tbaa !5
  store i64 %35, ptr %10, align 8, !tbaa !5
  %36 = load i64, ptr %4, align 8, !tbaa !5
  %37 = load i64, ptr %10, align 8, !tbaa !5
  %38 = icmp eq i64 %36, %37
  br i1 %38, label %39, label %40

39:                                               ; preds = %33
  store i32 3, ptr %9, align 4
  br label %87

40:                                               ; preds = %33
  %41 = load i64, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !9, !range !13, !noundef !14
  %44 = trunc i8 %43 to i1
  %45 = zext i1 %44 to i32
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %47, label %56

47:                                               ; preds = %40
  %48 = load i64, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %48
  %50 = load i64, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %50
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %51)
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = load i64, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %54
  store i64 %53, ptr %55, align 8, !tbaa !5
  br label %86

56:                                               ; preds = %40
  %57 = load i64, ptr %10, align 8, !tbaa !5
  %58 = load i64, ptr %3, align 8, !tbaa !5
  call void @_Z3dfsxx(i64 noundef %57, i64 noundef %58)
  %59 = load i64, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %59
  %61 = load i64, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %61
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %62)
  %64 = load i64, ptr %63, align 8, !tbaa !5
  %65 = load i64, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %65
  store i64 %64, ptr %66, align 8, !tbaa !5
  %67 = load i64, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = load i64, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !5
  %73 = icmp sge i64 %69, %72
  br i1 %73, label %74, label %83

74:                                               ; preds = %56
  %75 = load i64, ptr %4, align 8, !tbaa !5
  %76 = icmp ne i64 %75, -1
  br i1 %76, label %77, label %83

77:                                               ; preds = %74
  %78 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @cut_vertices, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %79 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %80 = extractvalue { ptr, i8 } %78, 0
  store ptr %80, ptr %79, align 8
  %81 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %82 = extractvalue { ptr, i8 } %78, 1
  store i8 %82, ptr %81, align 8
  br label %83

83:                                               ; preds = %77, %74, %56
  %84 = load i64, ptr %5, align 8, !tbaa !5
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %5, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %83, %47
  store i32 0, ptr %9, align 4
  br label %87

87:                                               ; preds = %86, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %88 = load i32, ptr %9, align 4
  switch i32 %88, label %105 [
    i32 0, label %89
    i32 3, label %90
  ]

89:                                               ; preds = %87
  br label %90

90:                                               ; preds = %89, %87
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br label %30

92:                                               ; preds = %32
  %93 = load i64, ptr %4, align 8, !tbaa !5
  %94 = icmp eq i64 %93, -1
  br i1 %94, label %95, label %104

95:                                               ; preds = %92
  %96 = load i64, ptr %5, align 8, !tbaa !5
  %97 = icmp sgt i64 %96, 1
  br i1 %97, label %98, label %104

98:                                               ; preds = %95
  %99 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @cut_vertices, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %100 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %101 = extractvalue { ptr, i8 } %99, 0
  store ptr %101, ptr %100, align 8
  %102 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %103 = extractvalue { ptr, i8 } %99, 1
  store i8 %103, ptr %102, align 8
  br label %104

104:                                              ; preds = %98, %95, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void

105:                                              ; preds = %87
  unreachable
}

; 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: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48), 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) #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

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 = { 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 = !{}


; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, 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
@in = external dso_local global [100001 x i64], align 16
@low = external dso_local global [100001 x i64], align 16
@timer = external dso_local local_unnamed_addr global i64, align 8
@cut_vertices = external dso_local global %"class.std::set", align 8

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

._crit_edge.thread:                               ; preds = %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %79

.lr.ph:                                           ; preds = %2
  %.not = icmp eq i64 %1, -1
  br i1 %.not, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %39
  %.019.us = phi i64 [ %.2.us, %39 ], [ 0, %.lr.ph ]
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %16 = load i64, ptr %15, align 8, !tbaa !5
  %17 = icmp eq i64 %16, -1
  br i1 %17, label %39, label %18

18:                                               ; preds = %.lr.ph.split.us
  %19 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %16
  %20 = load i8, ptr %19, align 1, !tbaa !9, !range !11, !noundef !12
  %21 = trunc nuw i8 %20 to i1
  %22 = load i64, ptr %3, align 8, !tbaa !5
  br i1 %21, label %32, label %23

23:                                               ; preds = %18
  call void @_Z3dfsxx(i64 noundef %16, i64 noundef %22)
  %24 = load i64, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %24
  %26 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %16
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = load i64, ptr %27, align 8, !tbaa !5
  %29 = load i64, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %29
  store i64 %28, ptr %30, align 8, !tbaa !5
  %31 = add nsw i64 %.019.us, 1
  br label %39

32:                                               ; preds = %18
  %33 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %22
  %34 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %16
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = load i64, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %37
  store i64 %36, ptr %38, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %32, %23, %.lr.ph.split.us
  %.2.us = phi i64 [ %.019.us, %.lr.ph.split.us ], [ %.019.us, %32 ], [ %31, %23 ]
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %41 = 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) #4
  br i1 %41, label %.lr.ph.split.us, label %._crit_edge

._crit_edge:                                      ; preds = %74, %39
  %.0.lcssa = phi i64 [ %.2.us, %39 ], [ %.2, %74 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %42 = icmp eq i64 %1, -1
  %43 = icmp sgt i64 %.0.lcssa, 1
  %or.cond3 = select i1 %42, i1 %43, i1 false
  br i1 %or.cond3, label %77, label %79

.lr.ph.split:                                     ; preds = %.lr.ph, %74
  %.019 = phi i64 [ %.2, %74 ], [ 0, %.lr.ph ]
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = icmp eq i64 %45, %1
  br i1 %46, label %74, label %47

47:                                               ; preds = %.lr.ph.split
  %48 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %45
  %49 = load i8, ptr %48, align 1, !tbaa !9, !range !11, !noundef !12
  %50 = trunc nuw i8 %49 to i1
  %51 = load i64, ptr %3, align 8, !tbaa !5
  br i1 %50, label %52, label %59

52:                                               ; preds = %47
  %53 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %51
  %54 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %45
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %54)
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = load i64, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %57
  store i64 %56, ptr %58, align 8, !tbaa !5
  br label %74

59:                                               ; preds = %47
  call void @_Z3dfsxx(i64 noundef %45, i64 noundef %51)
  %60 = load i64, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %60
  %62 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %45
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(8) %62)
  %64 = load i64, ptr %63, align 8, !tbaa !5
  %65 = load i64, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds [100001 x i64], ptr @low, i64 0, i64 %65
  store i64 %64, ptr %66, align 8, !tbaa !5
  %67 = load i64, ptr %62, align 8, !tbaa !5
  %68 = getelementptr inbounds [100001 x i64], ptr @in, i64 0, i64 %65
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %.not20 = icmp slt i64 %67, %69
  br i1 %.not20, label %72, label %70

70:                                               ; preds = %59
  %71 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @cut_vertices, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br label %72

72:                                               ; preds = %70, %59
  %73 = add nsw i64 %.019, 1
  br label %74

74:                                               ; preds = %52, %72, %.lr.ph.split
  %.2 = phi i64 [ %.019, %.lr.ph.split ], [ %.019, %52 ], [ %73, %72 ]
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %76 = 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) #4
  br i1 %76, label %.lr.ph.split, label %._crit_edge

77:                                               ; preds = %._crit_edge
  %78 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @cut_vertices, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br label %79

79:                                               ; preds = %._crit_edge.thread, %77, %._crit_edge
  ret void
}

; 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 uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48), 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) #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

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 = { 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 = !{}


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