; LLVM IR from Dev-XYS/Algorithms :: Fibonacci-Heap.ll (ZN13FibonacciHeap14_M_consolidateEv)

; 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.FibonacciHeap = type { ptr, i64 }
%"struct.FibonacciHeap::node" = type <{ ptr, ptr, ptr, ptr, i32, i32, i8, [7 x i8] }>

@_ZZN13FibonacciHeap14_M_consolidateEvE9root_list = external hidden global [100010 x ptr], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN13FibonacciHeap14_M_consolidateEv(ptr noundef nonnull align 8 dereferenceable(16) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [50 x ptr], align 16
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %12 = getelementptr inbounds %class.FibonacciHeap, ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %13, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %14, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %15

15:                                               ; preds = %24, %1
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = load i32, ptr %5, align 4, !tbaa !12
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr %5, align 4, !tbaa !12
  %19 = sext i32 %17 to i64
  %20 = getelementptr inbounds [100010 x ptr], ptr @_ZZN13FibonacciHeap14_M_consolidateEvE9root_list, i64 0, i64 %19
  store ptr %16, ptr %20, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %21, i32 0, i32 3
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  store ptr %23, ptr %4, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %15
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = icmp ne ptr %25, %26
  br i1 %27, label %15, label %28, !llvm.loop !17

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 400, ptr %6) #4
  %29 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %29, i8 0, i64 400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %30

30:                                               ; preds = %79, %28
  %31 = load i32, ptr %7, align 4, !tbaa !12
  %32 = load i32, ptr %5, align 4, !tbaa !12
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %82

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %36 = load i32, ptr %7, align 4, !tbaa !12
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100010 x ptr], ptr @_ZZN13FibonacciHeap14_M_consolidateEvE9root_list, i64 0, i64 %37
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  store ptr %39, ptr %8, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %63, %35
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %41, i32 0, i32 5
  %43 = load i32, ptr %42, align 4, !tbaa !19
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %72

48:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %49, i32 0, i32 5
  %51 = load i32, ptr %50, align 4, !tbaa !19
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  store ptr %54, ptr %9, align 8, !tbaa !5
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %55, i32 0, i32 4
  %57 = load i32, ptr %56, align 8, !tbaa !20
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %58, i32 0, i32 4
  %60 = load i32, ptr %59, align 8, !tbaa !20
  %61 = icmp sgt i32 %57, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %48
  call void @_ZSt4swapIPN13FibonacciHeap4nodeEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br label %63

63:                                               ; preds = %62, %48
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN13FibonacciHeap7_M_linkEPNS_4nodeES1_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %64, ptr noundef %65)
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %66, i32 0, i32 5
  %68 = load i32, ptr %67, align 4, !tbaa !19
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %67, align 4, !tbaa !19
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %70
  store ptr null, ptr %71, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %40, !llvm.loop !21

72:                                               ; preds = %40
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %74, i32 0, i32 5
  %76 = load i32, ptr %75, align 4, !tbaa !19
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %77
  store ptr %73, ptr %78, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %79

79:                                               ; preds = %72
  %80 = load i32, ptr %7, align 4, !tbaa !12
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %7, align 4, !tbaa !12
  br label %30, !llvm.loop !22

82:                                               ; preds = %34
  %83 = getelementptr inbounds %class.FibonacciHeap, ptr %11, i32 0, i32 0
  store ptr null, ptr %83, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %84

84:                                               ; preds = %143, %82
  %85 = load i32, ptr %10, align 4, !tbaa !12
  %86 = icmp slt i32 %85, 50
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %146

88:                                               ; preds = %84
  %89 = load i32, ptr %10, align 4, !tbaa !12
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %142

94:                                               ; preds = %88
  %95 = getelementptr inbounds %class.FibonacciHeap, ptr %11, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = icmp eq ptr %96, null
  br i1 %97, label %98, label %118

98:                                               ; preds = %94
  %99 = load i32, ptr %10, align 4, !tbaa !12
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.FibonacciHeap, ptr %11, i32 0, i32 0
  store ptr %102, ptr %103, align 8, !tbaa !9
  %104 = load i32, ptr %10, align 4, !tbaa !12
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = load i32, ptr %10, align 4, !tbaa !12
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %111, i32 0, i32 3
  store ptr %107, ptr %112, align 8, !tbaa !14
  %113 = load i32, ptr %10, align 4, !tbaa !12
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %116, i32 0, i32 2
  store ptr %107, ptr %117, align 8, !tbaa !23
  br label %141

118:                                              ; preds = %94
  %119 = load i32, ptr %10, align 4, !tbaa !12
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  call void @_ZN13FibonacciHeap22_M_insert_to_root_listEPNS_4nodeE(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %122)
  %123 = load i32, ptr %10, align 4, !tbaa !12
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %126, i32 0, i32 4
  %128 = load i32, ptr %127, align 8, !tbaa !20
  %129 = getelementptr inbounds %class.FibonacciHeap, ptr %11, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !9
  %131 = getelementptr inbounds %"struct.FibonacciHeap::node", ptr %130, i32 0, i32 4
  %132 = load i32, ptr %131, align 8, !tbaa !20
  %133 = icmp slt i32 %128, %132
  br i1 %133, label %134, label %140

134:                                              ; preds = %118
  %135 = load i32, ptr %10, align 4, !tbaa !12
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [50 x ptr], ptr %6, i64 0, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = getelementptr inbounds %class.FibonacciHeap, ptr %11, i32 0, i32 0
  store ptr %138, ptr %139, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %134, %118
  br label %141

141:                                              ; preds = %140, %98
  br label %142

142:                                              ; preds = %141, %88
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %10, align 4, !tbaa !12
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %10, align 4, !tbaa !12
  br label %84, !llvm.loop !24

146:                                              ; preds = %87
  call void @llvm.lifetime.end.p0(i64 400, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS13FibonacciHeap", !6, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 24}
!15 = !{!"_ZTSN13FibonacciHeap4nodeE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36, !16, i64 40}
!16 = !{!"bool", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!15, !13, i64 36}
!20 = !{!15, !13, i64 32}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}
!23 = !{!15, !6, i64 16}
!24 = distinct !{!24, !18}


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

@_ZZN13FibonacciHeap14_M_consolidateEvE9root_list = external hidden local_unnamed_addr global [100010 x ptr], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN13FibonacciHeap14_M_consolidateEv(ptr noundef nonnull align 8 dereferenceable(16) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca [50 x ptr], align 16
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  br label %6

6:                                                ; preds = %6, %1
  %indvars.iv38 = phi i32 [ %indvars.iv.next39, %6 ], [ 1, %1 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %6 ], [ 0, %1 ]
  %.022 = phi ptr [ %9, %6 ], [ %5, %1 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %7 = getelementptr inbounds [100010 x ptr], ptr @_ZZN13FibonacciHeap14_M_consolidateEvE9root_list, i64 0, i64 %indvars.iv
  store ptr %.022, ptr %7, align 8, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %.022, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %.not = icmp eq ptr %9, %5
  %indvars.iv.next39 = add nuw i32 %indvars.iv38, 1
  br i1 %.not, label %10, label %6, !llvm.loop !16

10:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %2) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %2, i8 0, i64 400, i1 false)
  %wide.trip.count = zext i32 %indvars.iv38 to i64
  br label %12

11:                                               ; preds = %._crit_edge
  store ptr null, ptr %0, align 8, !tbaa !5
  br label %42

12:                                               ; preds = %10, %._crit_edge
  %indvars.iv35 = phi i64 [ 0, %10 ], [ %indvars.iv.next36, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %13 = getelementptr inbounds [100010 x ptr], ptr @_ZZN13FibonacciHeap14_M_consolidateEvE9root_list, i64 0, i64 %indvars.iv35
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  store ptr %14, ptr %3, align 8, !tbaa !11
  %15 = getelementptr inbounds i8, ptr %14, i64 36
  %16 = load i32, ptr %15, align 4, !tbaa !18
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [50 x ptr], ptr %2, i64 0, i64 %17
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %.not2629 = icmp eq ptr %19, null
  br i1 %.not2629, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %12, %28
  %20 = phi ptr [ %39, %28 ], [ %19, %12 ]
  %21 = phi ptr [ %31, %28 ], [ %14, %12 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr %20, ptr %4, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %21, i64 32
  %23 = load i32, ptr %22, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %20, i64 32
  %25 = load i32, ptr %24, align 8, !tbaa !19
  %26 = icmp sgt i32 %23, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %.lr.ph
  call void @_ZSt4swapIPN13FibonacciHeap4nodeEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %.pre = load ptr, ptr %4, align 8, !tbaa !11
  %.pre44 = load ptr, ptr %3, align 8, !tbaa !11
  br label %28

28:                                               ; preds = %27, %.lr.ph
  %29 = phi ptr [ %.pre44, %27 ], [ %21, %.lr.ph ]
  %30 = phi ptr [ %.pre, %27 ], [ %20, %.lr.ph ]
  call void @_ZN13FibonacciHeap7_M_linkEPNS_4nodeES1_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %30, ptr noundef %29)
  %31 = load ptr, ptr %3, align 8, !tbaa !11
  %32 = getelementptr inbounds i8, ptr %31, i64 36
  %33 = load i32, ptr %32, align 4, !tbaa !18
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %32, align 4, !tbaa !18
  %35 = sext i32 %33 to i64
  %36 = getelementptr inbounds [50 x ptr], ptr %2, i64 0, i64 %35
  store ptr null, ptr %36, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %37 = sext i32 %34 to i64
  %38 = getelementptr inbounds [50 x ptr], ptr %2, i64 0, i64 %37
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %.not26 = icmp eq ptr %39, null
  br i1 %.not26, label %._crit_edge, label %.lr.ph, !llvm.loop !20

._crit_edge:                                      ; preds = %28, %12
  %.lcssa28 = phi i64 [ %17, %12 ], [ %37, %28 ]
  %.lcssa27 = phi ptr [ %14, %12 ], [ %31, %28 ]
  %40 = getelementptr inbounds [50 x ptr], ptr %2, i64 0, i64 %.lcssa28
  store ptr %.lcssa27, ptr %40, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %indvars.iv.next36 = add nuw nsw i64 %indvars.iv35, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next36, %wide.trip.count
  br i1 %exitcond.not, label %11, label %12, !llvm.loop !21

41:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %2) #4
  ret void

42:                                               ; preds = %11, %58
  %43 = phi ptr [ null, %11 ], [ %59, %58 ]
  %indvars.iv40 = phi i64 [ 0, %11 ], [ %indvars.iv.next41, %58 ]
  %44 = getelementptr inbounds [50 x ptr], ptr %2, i64 0, i64 %indvars.iv40
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %.not25 = icmp eq ptr %45, null
  br i1 %.not25, label %58, label %46

46:                                               ; preds = %42
  %47 = icmp eq ptr %43, null
  br i1 %47, label %48, label %51

48:                                               ; preds = %46
  store ptr %45, ptr %0, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %45, i64 24
  store ptr %45, ptr %49, align 8, !tbaa !12
  %50 = getelementptr inbounds i8, ptr %45, i64 16
  br label %.sink.split

51:                                               ; preds = %46
  call void @_ZN13FibonacciHeap22_M_insert_to_root_listEPNS_4nodeE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %45)
  %52 = getelementptr inbounds i8, ptr %45, i64 32
  %53 = load i32, ptr %52, align 8, !tbaa !19
  %54 = load ptr, ptr %0, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 32
  %56 = load i32, ptr %55, align 8, !tbaa !19
  %57 = icmp slt i32 %53, %56
  br i1 %57, label %.sink.split, label %58

.sink.split:                                      ; preds = %51, %48
  %.sink = phi ptr [ %50, %48 ], [ %0, %51 ]
  store ptr %45, ptr %.sink, align 8, !tbaa !11
  br label %58

58:                                               ; preds = %.sink.split, %42, %51
  %59 = phi ptr [ %43, %42 ], [ %54, %51 ], [ %45, %.sink.split ]
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %exitcond43.not = icmp eq i64 %indvars.iv.next41, 50
  br i1 %exitcond43.not, label %41, label %42, !llvm.loop !22
}

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIPN13FibonacciHeap4nodeEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"_ZTS13FibonacciHeap", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !7, i64 24}
!13 = !{!"_ZTSN13FibonacciHeap4nodeE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !14, i64 32, !14, i64 36, !15, i64 40}
!14 = !{!"int", !8, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!13, !14, i64 36}
!19 = !{!13, !14, i64 32}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


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