; LLVM IR from forestLoop/Learning-ITMO-Academy-Pilot-Course :: disjoint-sets-union/2-G.ll (Z8NoRefueliRSt6vectorISt5tupleIJiiiEESaIS1_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 i32 @_Z8NoRefueliRSt6vectorISt5tupleIJiiiEESaIS1_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 i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %class.anon, align 1
  %7 = alloca %"class.std::priority_queue", align 8
  %8 = alloca %class.DSU, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %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 %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  %16 = load ptr, ptr %5, align 8, !tbaa !9
  call void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ8NoRefueliRS4_E3$_0EC2ERS7_RKS4_"(ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 8 dereferenceable(24) %16)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  %17 = load i32, ptr %4, 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) %8, i64 noundef %19)
          to label %20 unwind label %42

20:                                               ; preds = %2
  br label %21

21:                                               ; preds = %73, %71, %20
  %22 = invoke noundef zeroext i1 @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ8NoRefueliRS4_E3$_0E5emptyEv"(ptr noundef nonnull align 8 dereferenceable(25) %7)
          to label %23 unwind label %46

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

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_EEKZ8NoRefueliRS4_E3$_0E3topEv"(ptr noundef nonnull align 8 dereferenceable(25) %7)
          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_EEKZ8NoRefueliRS4_E3$_0E3popEv"(ptr noundef nonnull align 8 dereferenceable(25) %7)
          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) %8, 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) %8, 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 %71, !llvm.loop !11

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

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

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

54:                                               ; preds = %58, %35, %31, %27
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %9, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %10, 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 %74

58:                                               ; preds = %39
  %59 = load ptr, ptr %12, align 8, !tbaa !9
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = load ptr, ptr %13, align 8, !tbaa !9
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = invoke noundef i32 @_ZN3DSU5UnionEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %60, i32 noundef %62)
          to label %64 unwind label %54

64:                                               ; preds = %58
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = icmp sge i32 %63, %65
  br i1 %66, label %67, label %70

67:                                               ; preds = %64
  %68 = load ptr, ptr %14, align 8, !tbaa !9
  %69 = load i32, ptr %68, align 4, !tbaa !5
  store i32 %69, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %71

70:                                               ; preds = %64
  store i32 0, ptr %15, align 4
  br label %71

71:                                               ; preds = %70, %67, %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
  %72 = load i32, ptr %15, align 4
  switch i32 %72, label %76 [
    i32 0, label %73
    i32 2, label %21
  ]

73:                                               ; preds = %71
  br label %21, !llvm.loop !11

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

75:                                               ; preds = %23
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %76

76:                                               ; preds = %75, %71
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @"_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ8NoRefueliRS4_E3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  %77 = load i32, ptr %3, align 4
  ret i32 %77

78:                                               ; preds = %74, %46
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %79

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

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

; 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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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 = distinct !{!11, !12}
!12 = !{!"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 i32 @_Z8NoRefueliRSt6vectorISt5tupleIJiiiEESaIS1_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_EEKZ8NoRefueliRS4_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 unwind label %22

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

.lr.ph:                                           ; preds = %.preheader, %select.unfold
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %10 = call noundef nonnull align 4 dereferenceable(12) ptr @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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 %33

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 %33

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

30:                                               ; preds = %26
  %.not = icmp slt i32 %29, %0
  br i1 %.not, label %select.unfold, label %.thread

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

select.unfold:                                    ; preds = %30, %20
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  %32 = call noundef zeroext i1 @"_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EEKZ8NoRefueliRS4_E3$_0E5emptyEv"(ptr noundef nonnull align 8 dereferenceable(25) %4)
  br i1 %32, label %.loopexit, label %.lr.ph

.loopexit:                                        ; preds = %select.unfold, %.preheader, %.thread
  %.2 = phi i32 [ %31, %.thread ], [ -1, %.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_EEKZ8NoRefueliRS4_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 i32 %.2

33:                                               ; 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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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_EEKZ8NoRefueliRS4_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: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass