; LLVM IR from Dev-XYS/Algorithms :: Prim.ll (Z4primv)

; 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"

%struct.vertex = type { i32 }
%struct.edge = type { i32, i32, i32 }
%"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<queue_node, std::allocator<queue_node>>::_Vector_impl" }
%"struct.std::_Vector_base<queue_node, std::allocator<queue_node>>::_Vector_impl" = type { %"struct.std::_Vector_base<queue_node, std::allocator<queue_node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<queue_node, std::allocator<queue_node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.queue_node = type { i32, i64 }

@V = external dso_local global [5010 x %struct.vertex], align 16
@E = external dso_local global [400010 x %struct.edge], align 16
@n = external dso_local global i32, align 4
@vis = external dso_local global [5010 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z4primv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::priority_queue", align 8
  %4 = alloca %struct.queue_node, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.queue_node, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.queue_node, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  store i64 0, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #5
  call void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #5
  invoke void @_ZN10queue_nodeC2Eix(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef 1, i64 noundef 0)
          to label %10 unwind label %49

10:                                               ; preds = %0
  invoke void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %11 unwind label %49

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  br label %12

12:                                               ; preds = %82, %11
  %13 = load i32, ptr %2, align 4, !tbaa !9
  %14 = load i32, ptr @n, align 4, !tbaa !9
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %16, label %84

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  %17 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %18 unwind label %53

18:                                               ; preds = %16
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !11
  invoke void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %19 unwind label %53

19:                                               ; preds = %18
  %20 = getelementptr inbounds %struct.queue_node, ptr %7, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !12
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [5010 x i8], ptr @vis, i64 0, i64 %22
  %24 = load i8, ptr %23, align 1, !tbaa !14, !range !16, !noundef !17
  %25 = trunc i8 %24 to i1
  %26 = zext i1 %25 to i32
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %82

28:                                               ; preds = %19
  %29 = getelementptr inbounds %struct.queue_node, ptr %7, i32 0, i32 1
  %30 = load i64, ptr %29, align 8, !tbaa !18
  %31 = load i64, ptr %1, align 8, !tbaa !5
  %32 = add nsw i64 %31, %30
  store i64 %32, ptr %1, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.queue_node, ptr %7, i32 0, i32 0
  %34 = load i32, ptr %33, align 8, !tbaa !12
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [5010 x i8], ptr @vis, i64 0, i64 %35
  store i8 1, ptr %36, align 1, !tbaa !14
  %37 = load i32, ptr %2, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %39 = getelementptr inbounds %struct.queue_node, ptr %7, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !12
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [5010 x %struct.vertex], ptr @V, i64 0, i64 %41
  %43 = getelementptr inbounds %struct.vertex, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 4, !tbaa !19
  store i32 %44, ptr %8, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %71, %28
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %57, label %48

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

49:                                               ; preds = %10, %0
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %5, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  br label %86

53:                                               ; preds = %18, %16
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %5, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %6, align 4
  br label %83

57:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [400010 x %struct.edge], ptr @E, i64 0, i64 %59
  %61 = getelementptr inbounds %struct.edge, ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !21
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [400010 x %struct.edge], ptr @E, i64 0, i64 %64
  %66 = getelementptr inbounds %struct.edge, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !23
  %68 = sext i32 %67 to i64
  invoke void @_ZN10queue_nodeC2Eix(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %62, i64 noundef %68)
          to label %69 unwind label %77

69:                                               ; preds = %57
  invoke void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %70 unwind label %77

70:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [400010 x %struct.edge], ptr @E, i64 0, i64 %73
  %75 = getelementptr inbounds %struct.edge, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 4, !tbaa !24
  store i32 %76, ptr %8, align 4, !tbaa !9
  br label %45, !llvm.loop !25

77:                                               ; preds = %69, %57
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %5, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %83

81:                                               ; preds = %48
  br label %82

82:                                               ; preds = %81, %19
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br label %12, !llvm.loop !27

83:                                               ; preds = %77, %53
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br label %86

84:                                               ; preds = %12
  %85 = load i64, ptr %1, align 8, !tbaa !5
  call void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret i64 %85

86:                                               ; preds = %83, %49
  call void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %5, align 8
  %89 = load i32, ptr %6, align 4
  %90 = insertvalue { ptr, i32 } poison, ptr %88, 0
  %91 = insertvalue { ptr, i32 } %90, i32 %89, 1
  resume { ptr, i32 } %91
}

; 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 void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10queue_nodeC2Eix(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i64 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; 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(16) ptr @_ZNKSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(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 uwtable
declare dso_local void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !9, i64 8, i64 8, !5}
!12 = !{!13, !10, i64 0}
!13 = !{!"_ZTS10queue_node", !10, i64 0, !6, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!13, !6, i64 8}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTS6vertex", !10, i64 0}
!21 = !{!22, !10, i64 0}
!22 = !{!"_ZTS4edge", !10, i64 0, !10, i64 4, !10, i64 8}
!23 = !{!22, !10, i64 8}
!24 = !{!22, !10, i64 4}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}


; 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"

%struct.vertex = type { i32 }
%struct.edge = type { i32, i32, i32 }
%"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<queue_node, std::allocator<queue_node>>::_Vector_impl" }
%"struct.std::_Vector_base<queue_node, std::allocator<queue_node>>::_Vector_impl" = type { %"struct.std::_Vector_base<queue_node, std::allocator<queue_node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<queue_node, std::allocator<queue_node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.queue_node = type { i32, i64 }

@V = external dso_local local_unnamed_addr global [5010 x %struct.vertex], align 16
@E = external dso_local local_unnamed_addr global [400010 x %struct.edge], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@vis = external dso_local local_unnamed_addr global [5010 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z4primv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::priority_queue", align 8
  %2 = alloca %struct.queue_node, align 8
  %3 = alloca %struct.queue_node, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #4
  call void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  call void @_ZN10queue_nodeC2Eix(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef 1, i64 noundef 0)
  invoke void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %4 unwind label %17

4:                                                ; preds = %0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph28, label %._crit_edge

.lr.ph28:                                         ; preds = %4, %.loopexit
  %.01227 = phi i64 [ %.1, %.loopexit ], [ 0, %4 ]
  %.01326 = phi i32 [ %.114, %.loopexit ], [ 0, %4 ]
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %.sroa.0.0.copyload = load i32, ptr %7, align 8, !tbaa !5
  %.sroa.76.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.76.0.copyload = load i64, ptr %.sroa.76.0..sroa_idx, align 8, !tbaa !9
  invoke void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
          to label %8 unwind label %19

8:                                                ; preds = %.lr.ph28
  %9 = sext i32 %.sroa.0.0.copyload to i64
  %10 = getelementptr inbounds [5010 x i8], ptr @vis, i64 0, i64 %9
  %11 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %12 = icmp eq i8 %11, 0
  br i1 %12, label %13, label %.loopexit

13:                                               ; preds = %8
  %14 = add nsw i64 %.sroa.76.0.copyload, %.01227
  store i8 1, ptr %10, align 1, !tbaa !11
  %15 = add nsw i32 %.01326, 1
  %16 = getelementptr inbounds [5010 x %struct.vertex], ptr @V, i64 0, i64 %9
  %.023 = load i32, ptr %16, align 4, !tbaa !5
  %.not24 = icmp eq i32 %.023, 0
  br i1 %.not24, label %.loopexit, label %.lr.ph

17:                                               ; preds = %0
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  br label %33

19:                                               ; preds = %.lr.ph28
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %33

.lr.ph:                                           ; preds = %13, %27
  %.025 = phi i32 [ %.0, %27 ], [ %.023, %13 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %21 = sext i32 %.025 to i64
  %22 = getelementptr inbounds [400010 x %struct.edge], ptr @E, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !15
  %24 = getelementptr inbounds i8, ptr %22, i64 8
  %25 = load i32, ptr %24, align 4, !tbaa !17
  %26 = sext i32 %25 to i64
  call void @_ZN10queue_nodeC2Eix(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %23, i64 noundef %26)
  invoke void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %27 unwind label %29

27:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  %28 = getelementptr inbounds i8, ptr %22, i64 4
  %.0 = load i32, ptr %28, align 4, !tbaa !5
  %.not = icmp eq i32 %.0, 0
  br i1 %.not, label %.loopexit, label %.lr.ph, !llvm.loop !18

29:                                               ; preds = %.lr.ph
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  br label %33

.loopexit:                                        ; preds = %27, %13, %8
  %.114 = phi i32 [ %.01326, %8 ], [ %15, %13 ], [ %15, %27 ]
  %.1 = phi i64 [ %.01227, %8 ], [ %14, %13 ], [ %14, %27 ]
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = icmp slt i32 %.114, %31
  br i1 %32, label %.lr.ph28, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %.loopexit, %4
  %.012.lcssa = phi i64 [ 0, %4 ], [ %.1, %.loopexit ]
  call void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  ret i64 %.012.lcssa

33:                                               ; preds = %19, %29, %17
  %.pn.pn = phi { ptr, i32 } [ %18, %17 ], [ %30, %29 ], [ %20, %19 ]
  call void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn.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 nounwind uwtable
declare dso_local void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10queue_nodeC2Eix(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i64 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; 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(16) ptr @_ZNKSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueI10queue_nodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) 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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!17 = !{!16, !6, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


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