; LLVM IR from andreimaximov/algorithms :: hacker-rank/algorithms/graph-theory/kruskal-mst-really-special-subtree (main)

; 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.disjoint_sets = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<disjoint_sets::set, std::allocator<disjoint_sets::set>>::_Vector_impl" }
%"struct.std::_Vector_base<disjoint_sets::set, std::allocator<disjoint_sets::set>>::_Vector_impl" = type { %"struct.std::_Vector_base<disjoint_sets::set, std::allocator<disjoint_sets::set>>::_Vector_impl_data" }
%"struct.std::_Vector_base<disjoint_sets::set, std::allocator<disjoint_sets::set>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.w_edge = type { i64, i64, i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z7kruskalmRKSt6vectorI6w_edgeSaIS0_EE(i64 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca %class.disjoint_sets, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  %13 = load i64, ptr %3, align 8, !tbaa !5
  call void @_ZN13disjoint_setsC2Em(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %14 = load ptr, ptr %4, align 8, !tbaa !9
  %15 = call ptr @_ZNKSt6vectorI6w_edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  %16 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %15, ptr %16, align 8
  br label %17

17:                                               ; preds = %63, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %18 = load ptr, ptr %4, align 8, !tbaa !9
  %19 = call ptr @_ZNKSt6vectorI6w_edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  %20 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  %21 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK6w_edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %21, label %22, label %27

22:                                               ; preds = %17
  %23 = load i64, ptr %6, align 8, !tbaa !5
  %24 = load i64, ptr %3, align 8, !tbaa !5
  %25 = sub i64 %24, 1
  %26 = icmp ult i64 %23, %25
  br label %27

27:                                               ; preds = %22, %17
  %28 = phi i1 [ false, %17 ], [ %26, %22 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br i1 %28, label %30, label %29

29:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %66

30:                                               ; preds = %27
  %31 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %32 = getelementptr inbounds %struct.w_edge, ptr %31, i32 0, i32 0
  %33 = load i64, ptr %32, align 8, !tbaa !13
  %34 = invoke noundef i64 @_ZNK13disjoint_sets4findEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %33)
          to label %35 unwind label %43

35:                                               ; preds = %30
  %36 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %37 = getelementptr inbounds %struct.w_edge, ptr %36, i32 0, i32 1
  %38 = load i64, ptr %37, align 8, !tbaa !15
  %39 = invoke noundef i64 @_ZNK13disjoint_sets4findEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %38)
          to label %40 unwind label %43

40:                                               ; preds = %35
  %41 = icmp eq i64 %34, %39
  br i1 %41, label %42, label %47

42:                                               ; preds = %40
  br label %63

43:                                               ; preds = %47, %35, %30
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %10, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @_ZN13disjoint_setsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %68

47:                                               ; preds = %40
  %48 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %49 = getelementptr inbounds %struct.w_edge, ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !13
  %51 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %52 = getelementptr inbounds %struct.w_edge, ptr %51, i32 0, i32 1
  %53 = load i64, ptr %52, align 8, !tbaa !15
  %54 = invoke noundef i64 @_ZN13disjoint_sets5mergeEmm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %50, i64 noundef %53)
          to label %55 unwind label %43

55:                                               ; preds = %47
  %56 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %57 = getelementptr inbounds %struct.w_edge, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 8, !tbaa !16
  %59 = load i32, ptr %5, align 4, !tbaa !11
  %60 = add i32 %59, %58
  store i32 %60, ptr %5, align 4, !tbaa !11
  %61 = load i64, ptr %6, align 8, !tbaa !5
  %62 = add i64 %61, 1
  store i64 %62, ptr %6, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %55, %42
  %64 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #4
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %64, ptr %65, align 8
  br label %17, !llvm.loop !17

66:                                               ; preds = %29
  %67 = load i32, ptr %5, align 4, !tbaa !11
  call void @_ZN13disjoint_setsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret i32 %67

68:                                               ; preds = %43
  %69 = load ptr, ptr %10, align 8
  %70 = load i32, ptr %11, align 4
  %71 = insertvalue { ptr, i32 } poison, ptr %69, 0
  %72 = insertvalue { ptr, i32 } %71, i32 %70, 1
  resume { ptr, i32 } %72
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorI6w_edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 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 uwtable
declare dso_local noundef i64 @_ZNK13disjoint_sets4findEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13disjoint_setsD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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", !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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS6w_edge", !6, i64 0, !6, i64 8, !12, i64 16}
!15 = !{!14, !6, i64 8}
!16 = !{!14, !12, i64 16}
!17 = distinct !{!17, !18}
!18 = !{!"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.disjoint_sets = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<disjoint_sets::set, std::allocator<disjoint_sets::set>>::_Vector_impl" }
%"struct.std::_Vector_base<disjoint_sets::set, std::allocator<disjoint_sets::set>>::_Vector_impl" = type { %"struct.std::_Vector_base<disjoint_sets::set, std::allocator<disjoint_sets::set>>::_Vector_impl_data" }
%"struct.std::_Vector_base<disjoint_sets::set, std::allocator<disjoint_sets::set>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z7kruskalmRKSt6vectorI6w_edgeSaIS0_EE(i64 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.disjoint_sets, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN13disjoint_setsC2Em(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %6 = call ptr @_ZNKSt6vectorI6w_edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  store ptr %6, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %7 = call ptr @_ZNKSt6vectorI6w_edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  store ptr %7, ptr %5, align 8
  %8 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK6w_edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %9 = add i64 %0, -1
  %10 = icmp ne i64 %9, 0
  %11 = and i1 %8, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %37, %2
  %.0.lcssa = phi i32 [ 0, %2 ], [ %.1, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN13disjoint_setsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  ret i32 %.0.lcssa

.lr.ph:                                           ; preds = %2, %37
  %.013 = phi i32 [ %.1, %37 ], [ 0, %2 ]
  %.0912 = phi i64 [ %.110, %37 ], [ 0, %2 ]
  %12 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = invoke noundef i64 @_ZNK13disjoint_sets4findEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %13)
          to label %15 unwind label %22

15:                                               ; preds = %.lr.ph
  %16 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !11
  %19 = invoke noundef i64 @_ZNK13disjoint_sets4findEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %18)
          to label %20 unwind label %22

20:                                               ; preds = %15
  %21 = icmp eq i64 %14, %19
  br i1 %21, label %37, label %24

22:                                               ; preds = %24, %15, %.lr.ph
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN13disjoint_setsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  resume { ptr, i32 } %23

24:                                               ; preds = %20
  %25 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load i64, ptr %28, align 8, !tbaa !11
  %30 = invoke noundef i64 @_ZN13disjoint_sets5mergeEmm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %26, i64 noundef %29)
          to label %31 unwind label %22

31:                                               ; preds = %24
  %32 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load i32, ptr %33, align 8, !tbaa !12
  %35 = add i32 %34, %.013
  %36 = add nuw i64 %.0912, 1
  br label %37

37:                                               ; preds = %20, %31
  %.110 = phi i64 [ %.0912, %20 ], [ %36, %31 ]
  %.1 = phi i32 [ %.013, %20 ], [ %35, %31 ]
  %38 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPK6w_edgeSt6vectorIS1_SaIS1_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %39 = call ptr @_ZNKSt6vectorI6w_edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  store ptr %39, ptr %5, align 8
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK6w_edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %41 = icmp ult i64 %.110, %9
  %42 = select i1 %40, i1 %41, i1 false
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !13
}

; 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 uwtable
declare dso_local void @_ZN13disjoint_setsC2Em(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorI6w_edgeSaIS0_EE5beginEv(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_cxxneIPK6w_edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(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 ptr @_ZNKSt6vectorI6w_edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 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 uwtable
declare dso_local noundef i64 @_ZNK13disjoint_sets4findEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13disjoint_setsD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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, !7, i64 0}
!6 = !{!"_ZTS6w_edge", !7, i64 0, !7, i64 8, !10, i64 16}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !10, i64 16}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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