; LLVM IR from forestLoop/Learning-ITMO-Academy-Pilot-Course :: disjoint-sets-union/2-E.ll (Z19MinimalSpanningTreeiRSt6vectorISt5tupleIJiiiEESaIS1_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.anon = type { i8 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.DSU = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.5", %"struct.std::_Head_base.8" }
%"struct.std::_Tuple_impl.5" = type { %"struct.std::_Tuple_impl.6", %"struct.std::_Head_base.7" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.7" = type { i32 }
%"struct.std::_Head_base.8" = type { i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z19MinimalSpanningTreeiRSt6vectorISt5tupleIJiiiEESaIS1_EE(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %class.anon, align 1
  %6 = alloca %"class.std::priority_queue", align 8
  %7 = alloca %class.DSU, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::tuple", align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  %16 = load ptr, ptr %4, align 8, !tbaa !9
  call void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0EC2ERS7_RKS4_"(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 8 dereferenceable(24) %16)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1
  %19 = sext i32 %18 to i64
  invoke void @_ZN3DSUC2Em(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %19)
          to label %20 unwind label %42

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %21

21:                                               ; preds = %76, %74, %20
  %22 = invoke noundef zeroext i1 @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E5emptyEv"(ptr noundef nonnull align 8 dereferenceable(25) %6)
          to label %23 unwind label %46

23:                                               ; preds = %21
  %24 = xor i1 %22, true
  br i1 %24, label %25, label %78

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #5
  %26 = invoke noundef nonnull align 4 dereferenceable(12) ptr @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E3topEv"(ptr noundef nonnull align 8 dereferenceable(25) %6)
          to label %27 unwind label %50

27:                                               ; preds = %25
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %26, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(12) %11) #5
  store ptr %28, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(12) %11) #5
  store ptr %29, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(12) %11) #5
  store ptr %30, ptr %14, align 8, !tbaa !9
  invoke void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E3popEv"(ptr noundef nonnull align 8 dereferenceable(25) %6)
          to label %31 unwind label %54

31:                                               ; preds = %27
  %32 = load ptr, ptr %12, align 8, !tbaa !9
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = invoke noundef i32 @_ZN3DSU4FindEi(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %33)
          to label %35 unwind label %54

35:                                               ; preds = %31
  %36 = load ptr, ptr %13, align 8, !tbaa !9
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = invoke noundef i32 @_ZN3DSU4FindEi(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %37)
          to label %39 unwind label %54

39:                                               ; preds = %35
  %40 = icmp eq i32 %34, %38
  br i1 %40, label %41, label %58

41:                                               ; preds = %39
  store i32 2, ptr %15, align 4
  br label %74, !llvm.loop !13

42:                                               ; preds = %2
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %8, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %9, align 4
  br label %81

46:                                               ; preds = %21
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %8, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %9, align 4
  br label %80

50:                                               ; preds = %25
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %8, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %9, align 4
  br label %77

54:                                               ; preds = %58, %35, %31, %27
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %8, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %77

58:                                               ; preds = %39
  %59 = load ptr, ptr %14, align 8, !tbaa !9
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = load i64, ptr %10, align 8, !tbaa !11
  %63 = add nsw i64 %62, %61
  store i64 %63, ptr %10, align 8, !tbaa !11
  %64 = load ptr, ptr %12, align 8, !tbaa !9
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = load ptr, ptr %13, align 8, !tbaa !9
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = invoke noundef i32 @_ZN3DSU5UnionEii(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %65, i32 noundef %67)
          to label %69 unwind label %54

69:                                               ; preds = %58
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = icmp sge i32 %68, %70
  br i1 %71, label %72, label %73

72:                                               ; preds = %69
  store i32 3, ptr %15, align 4
  br label %74

73:                                               ; preds = %69
  store i32 0, ptr %15, align 4
  br label %74

74:                                               ; preds = %73, %72, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  %75 = load i32, ptr %15, align 4
  switch i32 %75, label %87 [
    i32 0, label %76
    i32 2, label %21
    i32 3, label %78
  ]

76:                                               ; preds = %74
  br label %21, !llvm.loop !13

77:                                               ; preds = %54, %50
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  br label %80

78:                                               ; preds = %74, %23
  %79 = load i64, ptr %10, align 8, !tbaa !11
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret i64 %79

80:                                               ; preds = %77, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %81

81:                                               ; preds = %80, %42
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr %8, align 8
  %84 = load i32, ptr %9, align 4
  %85 = insertvalue { ptr, i32 } poison, ptr %83, 0
  %86 = insertvalue { ptr, i32 } %85, i32 %84, 1
  resume { ptr, i32 } %86

87:                                               ; preds = %74
  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 uwtable
declare hidden void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0EC2ERS7_RKS4_"(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E5emptyEv"(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 4 dereferenceable(12) ptr @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E3topEv"(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E3popEv"(ptr noundef nonnull align 8 dereferenceable(25)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3DSU5UnionEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #4 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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.anon = type { i8 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.DSU = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.5", %"struct.std::_Head_base.8" }
%"struct.std::_Tuple_impl.5" = type { %"struct.std::_Tuple_impl.6", %"struct.std::_Head_base.7" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.7" = type { i32 }
%"struct.std::_Head_base.8" = type { i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z19MinimalSpanningTreeiRSt6vectorISt5tupleIJiiiEESaIS1_EE(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.anon, align 1
  %4 = alloca %"class.std::priority_queue", align 8
  %5 = alloca %class.DSU, align 8
  %6 = alloca %"class.std::tuple", align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0EC2ERS7_RKS4_"(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  %7 = add nsw i32 %0, 1
  %8 = sext i32 %7 to i64
  invoke void @_ZN3DSUC2Em(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %8)
          to label %.preheader.preheader unwind label %22

.preheader.preheader:                             ; preds = %2
  %9 = call noundef zeroext i1 @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E5emptyEv"(ptr noundef nonnull align 8 dereferenceable(25) %4)
  br i1 %9, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader.preheader, %select.unfold
  %.01423 = phi i64 [ %.1, %select.unfold ], [ 0, %.preheader.preheader ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %10 = call noundef nonnull align 4 dereferenceable(12) ptr @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E3topEv"(ptr noundef nonnull align 8 dereferenceable(25) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %10, i64 12, i1 false)
  %11 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  invoke void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E3popEv"(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %14 unwind label %24

14:                                               ; preds = %.lr.ph
  %15 = load i32, ptr %11, align 4, !tbaa !5
  %16 = invoke noundef i32 @_ZN3DSU4FindEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %15)
          to label %17 unwind label %24

17:                                               ; preds = %14
  %18 = load i32, ptr %12, align 4, !tbaa !5
  %19 = invoke noundef i32 @_ZN3DSU4FindEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %18)
          to label %20 unwind label %24

20:                                               ; preds = %17
  %21 = icmp eq i32 %16, %19
  br i1 %21, label %select.unfold, label %26, !llvm.loop !9

22:                                               ; preds = %2
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %35

24:                                               ; preds = %26, %17, %14, %.lr.ph
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %35

26:                                               ; preds = %20
  %27 = load i32, ptr %13, align 4, !tbaa !5
  %28 = load i32, ptr %11, align 4, !tbaa !5
  %29 = load i32, ptr %12, align 4, !tbaa !5
  %30 = invoke noundef i32 @_ZN3DSU5UnionEii(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %28, i32 noundef %29)
          to label %31 unwind label %24

31:                                               ; preds = %26
  %32 = sext i32 %27 to i64
  %33 = add nsw i64 %.01423, %32
  %.not = icmp slt i32 %30, %0
  br i1 %.not, label %select.unfold, label %.thread

.thread:                                          ; preds = %31
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  br label %.loopexit

select.unfold:                                    ; preds = %31, %20
  %.1 = phi i64 [ %.01423, %20 ], [ %33, %31 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  %34 = call noundef zeroext i1 @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E5emptyEv"(ptr noundef nonnull align 8 dereferenceable(25) %4)
  br i1 %34, label %.loopexit, label %.lr.ph

.loopexit:                                        ; preds = %select.unfold, %.preheader.preheader, %.thread
  %.2 = phi i64 [ %33, %.thread ], [ 0, %.preheader.preheader ], [ %.1, %select.unfold ]
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  ret i64 %.2

35:                                               ; preds = %24, %22
  %.pn = phi { ptr, i32 } [ %25, %24 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

; 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 hidden void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0EC2ERS7_RKS4_"(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E5emptyEv"(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 4 dereferenceable(12) ptr @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E3topEv"(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0E3popEv"(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3DSU5UnionEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ19MinimalSpanningTreeiRS4_E3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #4 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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