; LLVM IR from AnneLivia/Competitive-Programming :: Data Structures/Tree/Binary Tree/binary_tree.ll (Z11delete_nodePP6Vertexi)

; 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.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Vertex *, std::allocator<Vertex *>>::_Deque_impl" }
%"struct.std::_Deque_base<Vertex *, std::allocator<Vertex *>>::_Deque_impl" = type { %"struct.std::_Deque_base<Vertex *, std::allocator<Vertex *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Vertex *, std::allocator<Vertex *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.Vertex = type { i32, ptr, ptr }

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14delete_deepestPP6VertexS0_(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11delete_nodePP6Vertexi(ptr noundef %0, i32 noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::queue", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %118

14:                                               ; preds = %2
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %118

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #5
  call void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %20 unwind label %37

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

21:                                               ; preds = %65, %20
  %22 = invoke noundef zeroext i1 @_ZNKSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %23 unwind label %41

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

25:                                               ; preds = %23
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %27 unwind label %41

27:                                               ; preds = %25
  %28 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %28, ptr %8, align 8, !tbaa !5
  invoke void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %29 unwind label %41

29:                                               ; preds = %27
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.Vertex, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = load i32, ptr %4, align 4, !tbaa !9
  %34 = icmp eq i32 %32, %33
  br i1 %34, label %35, label %45

35:                                               ; preds = %29
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %36, ptr %10, align 8, !tbaa !5
  br label %45

37:                                               ; preds = %18
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  br label %117

41:                                               ; preds = %60, %50, %27, %25, %21
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  br label %116

45:                                               ; preds = %35, %29
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.Vertex, ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %55

50:                                               ; preds = %45
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %51, ptr %9, align 8, !tbaa !5
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Vertex, ptr %52, i32 0, i32 1
  invoke void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %54 unwind label %41

54:                                               ; preds = %50
  br label %55

55:                                               ; preds = %54, %45
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.Vertex, ptr %56, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !14
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %65

60:                                               ; preds = %55
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %61, ptr %9, align 8, !tbaa !5
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.Vertex, ptr %62, i32 0, i32 2
  invoke void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %63)
          to label %64 unwind label %41

64:                                               ; preds = %60
  br label %65

65:                                               ; preds = %64, %55
  br label %21, !llvm.loop !15

66:                                               ; preds = %23
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %115

69:                                               ; preds = %66
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = icmp eq ptr %70, %71
  br i1 %72, label %73, label %100

73:                                               ; preds = %69
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = icmp eq ptr %74, null
  br i1 %75, label %76, label %79

76:                                               ; preds = %73
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr null, ptr %77, align 8, !tbaa !5
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %78) #5
  br label %99

79:                                               ; preds = %73
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.Vertex, ptr %80, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !14
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = icmp eq ptr %82, %83
  br i1 %84, label %85, label %88

85:                                               ; preds = %79
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.Vertex, ptr %86, i32 0, i32 2
  store ptr null, ptr %87, align 8, !tbaa !14
  br label %88

88:                                               ; preds = %85, %79
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.Vertex, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = icmp eq ptr %91, %92
  br i1 %93, label %94, label %97

94:                                               ; preds = %88
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.Vertex, ptr %95, i32 0, i32 1
  store ptr null, ptr %96, align 8, !tbaa !13
  br label %97

97:                                               ; preds = %94, %88
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %98) #5
  br label %99

99:                                               ; preds = %97, %76
  br label %114

100:                                              ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.Vertex, ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 8, !tbaa !11
  store i32 %103, ptr %11, align 4, !tbaa !9
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_Z14delete_deepestPP6VertexS0_(ptr noundef %104, ptr noundef %105)
          to label %106 unwind label %110

106:                                              ; preds = %100
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.Vertex, ptr %108, i32 0, i32 0
  store i32 %107, ptr %109, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %114

110:                                              ; preds = %100
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %6, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %116

114:                                              ; preds = %106, %99
  br label %115

115:                                              ; preds = %114, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #5
  br label %118

116:                                              ; preds = %110, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %117

117:                                              ; preds = %116, %37
  call void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #5
  br label %119

118:                                              ; preds = %115, %14, %2
  ret void

119:                                              ; preds = %117
  %120 = load ptr, ptr %6, align 8
  %121 = load i32, ptr %7, align 4
  %122 = insertvalue { ptr, i32 } poison, ptr %120, 0
  %123 = insertvalue { ptr, i32 } %122, i32 %121, 1
  resume { ptr, i32 } %123
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 #2 = { 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 #3 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS6Vertex", !10, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"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.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Vertex *, std::allocator<Vertex *>>::_Deque_impl" }
%"struct.std::_Deque_base<Vertex *, std::allocator<Vertex *>>::_Deque_impl" = type { %"struct.std::_Deque_base<Vertex *, std::allocator<Vertex *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Vertex *, std::allocator<Vertex *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14delete_deepestPP6VertexS0_(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11delete_nodePP6Vertexi(ptr noundef %0, i32 noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::queue", align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %47, label %4

4:                                                ; preds = %2
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %.not39 = icmp eq ptr %5, null
  br i1 %.not39, label %47, label %6

6:                                                ; preds = %4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #5
  call void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  invoke void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %.preheader unwind label %14

.preheader:                                       ; preds = %6
  %7 = call noundef zeroext i1 @_ZNKSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %7, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %23
  %.03149 = phi ptr [ %spec.select, %23 ], [ null, %.preheader ]
  %.03348 = phi ptr [ %.2, %23 ], [ null, %.preheader ]
  %8 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %10 = load i32, ptr %9, align 8, !tbaa !9
  %11 = icmp eq i32 %10, %1
  %spec.select = select i1 %11, ptr %9, ptr %.03149
  %12 = getelementptr inbounds i8, ptr %9, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %.not41 = icmp eq ptr %13, null
  br i1 %.not41, label %19, label %18

14:                                               ; preds = %6
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %46

16:                                               ; preds = %22, %18
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %46

18:                                               ; preds = %.lr.ph
  invoke void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %19 unwind label %16

19:                                               ; preds = %18, %.lr.ph
  %.134 = phi ptr [ %9, %18 ], [ %.03348, %.lr.ph ]
  %20 = getelementptr inbounds i8, ptr %9, i64 16
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %.not42 = icmp eq ptr %21, null
  br i1 %.not42, label %23, label %22

22:                                               ; preds = %19
  invoke void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %23 unwind label %16

23:                                               ; preds = %22, %19
  %.2 = phi ptr [ %9, %22 ], [ %.134, %19 ]
  %24 = call noundef zeroext i1 @_ZNKSt5queueIP6VertexSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %24, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %23
  %.not40 = icmp eq ptr %spec.select, null
  br i1 %.not40, label %._crit_edge.thread, label %25

25:                                               ; preds = %._crit_edge
  %26 = icmp eq ptr %9, %spec.select
  br i1 %26, label %27, label %41

27:                                               ; preds = %25
  %28 = icmp eq ptr %.2, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %27
  store ptr null, ptr %0, align 8, !tbaa !5
  call void @free(ptr noundef nonnull %9) #5
  br label %._crit_edge.thread

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %.2, i64 16
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  %33 = icmp eq ptr %32, %9
  br i1 %33, label %34, label %35

34:                                               ; preds = %30
  store ptr null, ptr %31, align 8, !tbaa !13
  br label %35

35:                                               ; preds = %34, %30
  %36 = getelementptr inbounds i8, ptr %.2, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !12
  %38 = icmp eq ptr %37, %9
  br i1 %38, label %39, label %40

39:                                               ; preds = %35
  store ptr null, ptr %36, align 8, !tbaa !12
  br label %40

40:                                               ; preds = %39, %35
  call void @free(ptr noundef nonnull %9) #5
  br label %._crit_edge.thread

41:                                               ; preds = %25
  %42 = load i32, ptr %9, align 8, !tbaa !9
  invoke void @_Z14delete_deepestPP6VertexS0_(ptr noundef nonnull %0, ptr noundef nonnull %9)
          to label %43 unwind label %44

43:                                               ; preds = %41
  store i32 %42, ptr %spec.select, align 8, !tbaa !9
  br label %._crit_edge.thread

44:                                               ; preds = %41
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %46

._crit_edge.thread:                               ; preds = %.preheader, %43, %40, %29, %._crit_edge
  call void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #5
  br label %47

46:                                               ; preds = %16, %44, %14
  %.pn.pn = phi { ptr, i32 } [ %15, %14 ], [ %17, %16 ], [ %45, %44 ]
  call void @_ZNSt5queueIP6VertexSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn

47:                                               ; preds = %._crit_edge.thread, %4, %2
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #2 = { 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 #3 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS6Vertex", !11, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !6, i64 16}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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