; LLVM IR from 6leetcode/6leetcode :: questions/Algorithms/0094. Binary Tree Inorder Traversal (cc)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z15TreeNode_createSt6vectorIiSaIiEE(ptr noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::deque", align 8
  %8 = alloca %"class.std::initializer_list", align 8
  %9 = alloca [1 x ptr], align 8
  %10 = alloca %"class.std::allocator.0", align 1
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %13 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %14 = icmp eq i64 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %1
  store ptr null, ptr %2, align 8
  br label %94

16:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %17 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #6
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #5
  %19 = load i32, ptr %18, align 4, !tbaa !9
  invoke void @_ZN8TreeNodeC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %17, i32 noundef %19)
          to label %20 unwind label %34

20:                                               ; preds = %16
  store ptr %17, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %21, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.std::initializer_list", ptr %8, i32 0, i32 0
  store ptr %9, ptr %22, align 8, !tbaa !11
  %23 = getelementptr inbounds %"class.std::initializer_list", ptr %8, i32 0, i32 1
  store i64 1, ptr %23, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIP8TreeNodeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  %24 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8
  %26 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %27 = load i64, ptr %26, align 8
  invoke void @_ZNSt5dequeIP8TreeNodeSaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr %25, i64 %27, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %28 unwind label %38

28:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorIP8TreeNodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 1, ptr %11, align 8, !tbaa !15
  br label %29

29:                                               ; preds = %86, %28
  %30 = load i64, ptr %11, align 8, !tbaa !15
  %31 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %32 = icmp ult i64 %30, %31
  br i1 %32, label %42, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %90

34:                                               ; preds = %16
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %5, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %17, i64 noundef 24) #7
  br label %93

38:                                               ; preds = %20
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %5, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIP8TreeNodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %92

42:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIP8TreeNodeSaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  store ptr %44, ptr %12, align 8, !tbaa !5
  call void @_ZNSt5dequeIP8TreeNodeSaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  %45 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #6
          to label %46 unwind label %73

46:                                               ; preds = %42
  %47 = load i64, ptr %11, align 8, !tbaa !15
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %47) #5
  %49 = load i32, ptr %48, align 4, !tbaa !9
  invoke void @_ZN8TreeNodeC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %45, i32 noundef %49)
          to label %50 unwind label %77

50:                                               ; preds = %46
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.TreeNode, ptr %51, i32 0, i32 1
  store ptr %45, ptr %52, align 8, !tbaa !16
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.TreeNode, ptr %53, i32 0, i32 1
  invoke void @_ZNSt5dequeIP8TreeNodeSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(8) %54)
          to label %55 unwind label %73

55:                                               ; preds = %50
  %56 = load i64, ptr %11, align 8, !tbaa !15
  %57 = add i64 %56, 1
  %58 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %60, label %85

60:                                               ; preds = %55
  %61 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #6
          to label %62 unwind label %73

62:                                               ; preds = %60
  %63 = load i64, ptr %11, align 8, !tbaa !15
  %64 = add i64 %63, 1
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %64) #5
  %66 = load i32, ptr %65, align 4, !tbaa !9
  invoke void @_ZN8TreeNodeC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %61, i32 noundef %66)
          to label %67 unwind label %81

67:                                               ; preds = %62
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.TreeNode, ptr %68, i32 0, i32 2
  store ptr %61, ptr %69, align 8, !tbaa !18
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.TreeNode, ptr %70, i32 0, i32 2
  invoke void @_ZNSt5dequeIP8TreeNodeSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(8) %71)
          to label %72 unwind label %73

72:                                               ; preds = %67
  br label %85

73:                                               ; preds = %67, %60, %50, %42
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %5, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %6, align 4
  br label %89

77:                                               ; preds = %46
  %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 @_ZdlPvm(ptr noundef %45, i64 noundef 24) #7
  br label %89

81:                                               ; preds = %62
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %5, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %61, i64 noundef 24) #7
  br label %89

85:                                               ; preds = %72, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %86

86:                                               ; preds = %85
  %87 = load i64, ptr %11, align 8, !tbaa !15
  %88 = add i64 %87, 2
  store i64 %88, ptr %11, align 8, !tbaa !15
  br label %29, !llvm.loop !19

89:                                               ; preds = %81, %77, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZNSt5dequeIP8TreeNodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  br label %92

90:                                               ; preds = %33
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %91, ptr %2, align 8
  call void @_ZNSt5dequeIP8TreeNodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %94

92:                                               ; preds = %89, %38
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #5
  br label %93

93:                                               ; preds = %92, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %96

94:                                               ; preds = %90, %15
  %95 = load ptr, ptr %2, align 8
  ret ptr %95

96:                                               ; preds = %93
  %97 = load ptr, ptr %5, align 8
  %98 = load i32, ptr %6, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIP8TreeNodeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIP8TreeNodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 = { nobuiltin 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 #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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, !6, i64 0}
!12 = !{!"_ZTSSt16initializer_listIP8TreeNodeE", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTS8TreeNode", !10, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!17, !6, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<TreeNode *, std::allocator<TreeNode *>>::_Deque_impl" }
%"struct.std::_Deque_base<TreeNode *, std::allocator<TreeNode *>>::_Deque_impl" = type { %"struct.std::_Deque_base<TreeNode *, std::allocator<TreeNode *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<TreeNode *, std::allocator<TreeNode *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::allocator.0" = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z15TreeNode_createSt6vectorIiSaIiEE(ptr noundef nonnull %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::deque", align 8
  %3 = alloca [1 x ptr], align 8
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %6 = icmp eq i64 %5, 0
  br i1 %6, label %40, label %7

7:                                                ; preds = %1
  %8 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #5
  %9 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %10 = load i32, ptr %9, align 4, !tbaa !5
  tail call void @_ZN8TreeNodeC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %10)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store ptr %8, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIP8TreeNodeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt5dequeIP8TreeNodeSaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr nonnull %3, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %11 unwind label %14

11:                                               ; preds = %7
  call void @_ZNSt15__new_allocatorIP8TreeNodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %12 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %13 = icmp ugt i64 %12, 1
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %35, %11
  call void @_ZNSt5dequeIP8TreeNodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #4
  br label %40

14:                                               ; preds = %7
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIP8TreeNodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %39

.lr.ph:                                           ; preds = %11, %35
  %.01318 = phi i64 [ %36, %35 ], [ 1, %11 ]
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIP8TreeNodeSaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  call void @_ZNSt5dequeIP8TreeNodeSaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  %18 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #5
          to label %19 unwind label %33

19:                                               ; preds = %.lr.ph
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.01318) #4
  %21 = load i32, ptr %20, align 4, !tbaa !5
  call void @_ZN8TreeNodeC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %21)
  %22 = getelementptr inbounds i8, ptr %17, i64 8
  store ptr %18, ptr %22, align 8, !tbaa !11
  invoke void @_ZNSt5dequeIP8TreeNodeSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %23 unwind label %33

23:                                               ; preds = %19
  %24 = add nuw i64 %.01318, 1
  %25 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %27, label %35

27:                                               ; preds = %23
  %28 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #5
          to label %29 unwind label %33

29:                                               ; preds = %27
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %24) #4
  %31 = load i32, ptr %30, align 4, !tbaa !5
  call void @_ZN8TreeNodeC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %28, i32 noundef %31)
  %32 = getelementptr inbounds i8, ptr %17, i64 16
  store ptr %28, ptr %32, align 8, !tbaa !13
  invoke void @_ZNSt5dequeIP8TreeNodeSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %35 unwind label %33

33:                                               ; preds = %29, %27, %19, %.lr.ph
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt5dequeIP8TreeNodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #4
  br label %39

35:                                               ; preds = %29, %23
  %36 = add i64 %.01318, 2
  %37 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %38 = icmp ult i64 %36, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !14

39:                                               ; preds = %33, %14
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn

40:                                               ; preds = %1, %._crit_edge
  %.0 = phi ptr [ %8, %._crit_edge ], [ null, %1 ]
  ret ptr %.0
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIP8TreeNodeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeIP8TreeNodeSaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(80), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) 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) #2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIP8TreeNodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 }
attributes #5 = { builtin allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS8TreeNode", !6, i64 0, !10, i64 8, !10, i64 16}
!13 = !{!12, !10, i64 16}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass