; LLVM IR from TheAlgorithms/C-Plus-Plus :: data_structures/tree_234.ll (ZN15data_structures8tree_2347Tree2345PrintEPKc)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<NodeInfo, std::allocator<NodeInfo>>::_Deque_impl" }
%"struct.std::_Deque_base<NodeInfo, std::allocator<NodeInfo>>::_Deque_impl" = type { %"struct.std::_Deque_base<NodeInfo, std::allocator<NodeInfo>>::_Deque_impl_data" }
%"struct.std::_Deque_base<NodeInfo, std::allocator<NodeInfo>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.NodeInfo = type { ptr, i64 }
%"class.data_structures::tree_234::Tree234" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__._ZN15data_structures8tree_2347Tree2345PrintEPKc = external hidden unnamed_addr constant [61 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57), i8 noundef signext) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN15data_structures8tree_2344Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(57)) #1 align 2

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

16:                                               ; preds = %2
  store ptr @.str.14, ptr %4, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %16, %2
  call void @llvm.lifetime.start.p0(i64 512, ptr %5) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5)
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef %18, i32 noundef 16)
          to label %19 unwind label %34

19:                                               ; preds = %17
  %20 = load ptr, ptr %5, align 8, !tbaa !9
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %5, i64 %22
  %24 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %23)
          to label %25 unwind label %34

25:                                               ; preds = %19
  br i1 %24, label %26, label %38

26:                                               ; preds = %25
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.15)
          to label %28 unwind label %34

28:                                               ; preds = %26
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef %29)
          to label %31 unwind label %34

31:                                               ; preds = %28
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %33 unwind label %34

33:                                               ; preds = %31
  store i32 1, ptr %8, align 4
  br label %196

34:                                               ; preds = %40, %38, %31, %28, %26, %19, %17
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %6, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %7, align 4
  br label %201

38:                                               ; preds = %25
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.16)
          to label %40 unwind label %34

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.17)
          to label %42 unwind label %34

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 80, ptr %10) #8
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEEC2IS8_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %10)
          to label %43 unwind label %74

43:                                               ; preds = %42
  %44 = getelementptr inbounds %"class.data_structures::tree_234::Tree234", ptr %13, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %192

47:                                               ; preds = %43
  %48 = getelementptr inbounds %"class.data_structures::tree_234::Tree234", ptr %13, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = load i64, ptr %9, align 8, !tbaa !11
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef %49, i64 noundef -1, i64 noundef %50, i8 noundef signext 0)
          to label %51 unwind label %78

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 16, i1 false)
  %52 = getelementptr inbounds %"class.data_structures::tree_234::Tree234", ptr %13, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 0
  store ptr %53, ptr %54, align 8, !tbaa !15
  %55 = load i64, ptr %9, align 8, !tbaa !11
  %56 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 1
  store i64 %55, ptr %56, align 8, !tbaa !17
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %57 unwind label %82

57:                                               ; preds = %51
  br label %58

58:                                               ; preds = %189, %57
  %59 = invoke noundef zeroext i1 @_ZNKSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %10)
          to label %60 unwind label %82

60:                                               ; preds = %58
  %61 = xor i1 %59, true
  br i1 %61, label %62, label %190

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %63 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %10)
          to label %64 unwind label %86

64:                                               ; preds = %62
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %63, i64 16, i1 false), !tbaa.struct !18
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %10)
          to label %65 unwind label %86

65:                                               ; preds = %64
  %66 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !15
  %68 = invoke noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57) %67)
          to label %69 unwind label %86

69:                                               ; preds = %65
  %70 = sext i8 %68 to i32
  %71 = icmp sgt i32 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %69
  br label %91

73:                                               ; preds = %69
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.2, i32 noundef 1173, ptr noundef @__PRETTY_FUNCTION__._ZN15data_structures8tree_2347Tree2345PrintEPKc) #9
  unreachable

74:                                               ; preds = %42
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  br label %200

78:                                               ; preds = %194, %192, %47
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %6, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %7, align 4
  br label %199

82:                                               ; preds = %58, %51
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %6, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %7, align 4
  br label %191

86:                                               ; preds = %183, %179, %174, %170, %163, %158, %154, %149, %145, %138, %133, %129, %124, %120, %116, %112, %107, %103, %96, %91, %65, %64, %62
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %6, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %191

90:                                               ; No predecessors!
  br label %91

91:                                               ; preds = %90, %72
  %92 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  %94 = invoke noundef zeroext i1 @_ZN15data_structures8tree_2344Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(57) %93)
          to label %95 unwind label %86

95:                                               ; preds = %91
  br i1 %94, label %189, label %96

96:                                               ; preds = %95
  %97 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !15
  %99 = invoke noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57) %98)
          to label %100 unwind label %86

100:                                              ; preds = %96
  %101 = sext i8 %99 to i32
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %103, label %138

103:                                              ; preds = %100
  %104 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !15
  %106 = invoke noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %105, i8 noundef signext 0)
          to label %107 unwind label %86

107:                                              ; preds = %103
  %108 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 1
  %109 = load i64, ptr %108, align 8, !tbaa !17
  %110 = load i64, ptr %9, align 8, !tbaa !11
  %111 = add nsw i64 %110, 1
  store i64 %111, ptr %9, align 8, !tbaa !11
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef %106, i64 noundef %109, i64 noundef %111, i8 noundef signext 0)
          to label %112 unwind label %86

112:                                              ; preds = %107
  %113 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !15
  %115 = invoke noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %114, i8 noundef signext 0)
          to label %116 unwind label %86

116:                                              ; preds = %112
  %117 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 0
  store ptr %115, ptr %117, align 8, !tbaa !15
  %118 = load i64, ptr %9, align 8, !tbaa !11
  %119 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 1
  store i64 %118, ptr %119, align 8, !tbaa !17
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %120 unwind label %86

120:                                              ; preds = %116
  %121 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !15
  %123 = invoke noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %122, i8 noundef signext 1)
          to label %124 unwind label %86

124:                                              ; preds = %120
  %125 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 1
  %126 = load i64, ptr %125, align 8, !tbaa !17
  %127 = load i64, ptr %9, align 8, !tbaa !11
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %9, align 8, !tbaa !11
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef %123, i64 noundef %126, i64 noundef %128, i8 noundef signext 1)
          to label %129 unwind label %86

129:                                              ; preds = %124
  %130 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !15
  %132 = invoke noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %131, i8 noundef signext 1)
          to label %133 unwind label %86

133:                                              ; preds = %129
  %134 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 0
  store ptr %132, ptr %134, align 8, !tbaa !15
  %135 = load i64, ptr %9, align 8, !tbaa !11
  %136 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 1
  store i64 %135, ptr %136, align 8, !tbaa !17
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %137 unwind label %86

137:                                              ; preds = %133
  br label %138

138:                                              ; preds = %137, %100
  %139 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !15
  %141 = invoke noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57) %140)
          to label %142 unwind label %86

142:                                              ; preds = %138
  %143 = sext i8 %141 to i32
  %144 = icmp sgt i32 %143, 1
  br i1 %144, label %145, label %163

145:                                              ; preds = %142
  %146 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !15
  %148 = invoke noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %147, i8 noundef signext 2)
          to label %149 unwind label %86

149:                                              ; preds = %145
  %150 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 1
  %151 = load i64, ptr %150, align 8, !tbaa !17
  %152 = load i64, ptr %9, align 8, !tbaa !11
  %153 = add nsw i64 %152, 1
  store i64 %153, ptr %9, align 8, !tbaa !11
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef %148, i64 noundef %151, i64 noundef %153, i8 noundef signext 2)
          to label %154 unwind label %86

154:                                              ; preds = %149
  %155 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !15
  %157 = invoke noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %156, i8 noundef signext 2)
          to label %158 unwind label %86

158:                                              ; preds = %154
  %159 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 0
  store ptr %157, ptr %159, align 8, !tbaa !15
  %160 = load i64, ptr %9, align 8, !tbaa !11
  %161 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 1
  store i64 %160, ptr %161, align 8, !tbaa !17
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %162 unwind label %86

162:                                              ; preds = %158
  br label %163

163:                                              ; preds = %162, %142
  %164 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !15
  %166 = invoke noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57) %165)
          to label %167 unwind label %86

167:                                              ; preds = %163
  %168 = sext i8 %166 to i32
  %169 = icmp sgt i32 %168, 2
  br i1 %169, label %170, label %188

170:                                              ; preds = %167
  %171 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !15
  %173 = invoke noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %172, i8 noundef signext 3)
          to label %174 unwind label %86

174:                                              ; preds = %170
  %175 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 1
  %176 = load i64, ptr %175, align 8, !tbaa !17
  %177 = load i64, ptr %9, align 8, !tbaa !11
  %178 = add nsw i64 %177, 1
  store i64 %178, ptr %9, align 8, !tbaa !11
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef %173, i64 noundef %176, i64 noundef %178, i8 noundef signext 3)
          to label %179 unwind label %86

179:                                              ; preds = %174
  %180 = getelementptr inbounds %struct.NodeInfo, ptr %12, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !15
  %182 = invoke noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %181, i8 noundef signext 3)
          to label %183 unwind label %86

183:                                              ; preds = %179
  %184 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 0
  store ptr %182, ptr %184, align 8, !tbaa !15
  %185 = load i64, ptr %9, align 8, !tbaa !11
  %186 = getelementptr inbounds %struct.NodeInfo, ptr %11, i32 0, i32 1
  store i64 %185, ptr %186, align 8, !tbaa !17
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %187 unwind label %86

187:                                              ; preds = %183
  br label %188

188:                                              ; preds = %187, %167
  br label %189

189:                                              ; preds = %188, %95
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %58, !llvm.loop !19

190:                                              ; preds = %60
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %192

191:                                              ; preds = %86, %82
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %199

192:                                              ; preds = %190, %43
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.19)
          to label %194 unwind label %78

194:                                              ; preds = %192
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %195 unwind label %78

195:                                              ; preds = %194
  call void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %10) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  store i32 0, ptr %8, align 4
  br label %196

196:                                              ; preds = %195, %33
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #8
  %197 = load i32, ptr %8, align 4
  switch i32 %197, label %207 [
    i32 0, label %198
    i32 1, label %198
  ]

198:                                              ; preds = %196, %196
  ret void

199:                                              ; preds = %191, %78
  call void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %10) #8
  br label %200

200:                                              ; preds = %199, %74
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %201

201:                                              ; preds = %200, %34
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #8
  br label %202

202:                                              ; preds = %201
  %203 = load ptr, ptr %6, align 8
  %204 = load i32, ptr %7, align 4
  %205 = insertvalue { ptr, i32 } poison, ptr %203, 0
  %206 = insertvalue { ptr, i32 } %205, i32 %204, 1
  resume { ptr, i32 } %206

207:                                              ; preds = %196
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i64 noundef, i64 noundef, i8 noundef signext) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNKSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 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) #6

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #7 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 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 = { noreturn 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN15data_structures8tree_2347Tree234E", !6, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfo", !6, i64 0, !12, i64 8}
!17 = !{!16, !12, i64 8}
!18 = !{i64 0, i64 8, !5, i64 8, i64 8, !11}
!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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<NodeInfo, std::allocator<NodeInfo>>::_Deque_impl" }
%"struct.std::_Deque_base<NodeInfo, std::allocator<NodeInfo>>::_Deque_impl" = type { %"struct.std::_Deque_base<NodeInfo, std::allocator<NodeInfo>>::_Deque_impl_data" }
%"struct.std::_Deque_base<NodeInfo, std::allocator<NodeInfo>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.NodeInfo = type { ptr, i64 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__._ZN15data_structures8tree_2347Tree2345PrintEPKc = external hidden unnamed_addr constant [61 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57), i8 noundef signext) local_unnamed_addr #1 align 2

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN15data_structures8tree_2344Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(57)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15data_structures8tree_2347Tree2345PrintEPKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::basic_ofstream", align 8
  %4 = alloca %"class.std::queue", align 8
  %5 = alloca %struct.NodeInfo, align 8
  %.not = icmp eq ptr %1, null
  %spec.store.select = select i1 %.not, ptr @.str.14, ptr %1
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull %spec.store.select, i32 noundef 16)
          to label %6 unwind label %19

6:                                                ; preds = %2
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr %3, i64 %9
  %11 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %10)
          to label %12 unwind label %19

12:                                               ; preds = %6
  br i1 %11, label %13, label %21

13:                                               ; preds = %12
  %14 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.15)
          to label %15 unwind label %19

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull %spec.store.select)
          to label %17 unwind label %19

17:                                               ; preds = %15
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %83 unwind label %19

19:                                               ; preds = %23, %21, %17, %15, %13, %6, %2
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %86

21:                                               ; preds = %12
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.16)
          to label %23 unwind label %19

23:                                               ; preds = %21
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.17)
          to label %25 unwind label %19

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #6
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEEC2IS8_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %26 unwind label %37

26:                                               ; preds = %25
  %27 = load ptr, ptr %0, align 8, !tbaa !8
  %.not39 = icmp eq ptr %27, null
  br i1 %.not39, label %79, label %28

28:                                               ; preds = %26
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull %27, i64 noundef -1, i64 noundef 0, i8 noundef signext 0)
          to label %29 unwind label %39

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %30 = load ptr, ptr %0, align 8, !tbaa !8
  store ptr %30, ptr %5, align 8, !tbaa !12
  %31 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 0, ptr %31, align 8, !tbaa !15
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %.preheader unwind label %41

.preheader:                                       ; preds = %29
  %32 = call noundef zeroext i1 @_ZNKSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  br i1 %32, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %76
  %.03045 = phi i64 [ %.333, %76 ], [ 0, %.preheader ]
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %.sroa.0.0.copyload = load ptr, ptr %33, align 8, !tbaa !16
  %.sroa.17.0..sroa_idx = getelementptr inbounds i8, ptr %33, i64 8
  %.sroa.17.0.copyload = load i64, ptr %.sroa.17.0..sroa_idx, align 8, !tbaa !17
  call void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %34 = call noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload)
  %35 = icmp sgt i8 %34, 0
  br i1 %35, label %45, label %36

36:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.2, i32 noundef 1173, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN15data_structures8tree_2347Tree2345PrintEPKc) #7
  unreachable

37:                                               ; preds = %25
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %85

39:                                               ; preds = %81, %79, %28
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %84

41:                                               ; preds = %29
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %78

43:                                               ; preds = %74, %71, %66, %63, %58, %55, %53, %50
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %78

45:                                               ; preds = %.lr.ph
  %46 = call noundef zeroext i1 @_ZN15data_structures8tree_2344Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload)
  br i1 %46, label %76, label %47

47:                                               ; preds = %45
  %48 = call noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload)
  %49 = icmp sgt i8 %48, 0
  br i1 %49, label %50, label %60

50:                                               ; preds = %47
  %51 = call noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload, i8 noundef signext 0)
  %52 = add nsw i64 %.03045, 1
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef %51, i64 noundef %.sroa.17.0.copyload, i64 noundef %52, i8 noundef signext 0)
          to label %53 unwind label %43

53:                                               ; preds = %50
  %54 = call noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload, i8 noundef signext 0)
  store ptr %54, ptr %5, align 8, !tbaa !12
  store i64 %52, ptr %31, align 8, !tbaa !15
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %55 unwind label %43

55:                                               ; preds = %53
  %56 = call noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload, i8 noundef signext 1)
  %57 = add nsw i64 %.03045, 2
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef %56, i64 noundef %.sroa.17.0.copyload, i64 noundef %57, i8 noundef signext 1)
          to label %58 unwind label %43

58:                                               ; preds = %55
  %59 = call noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload, i8 noundef signext 1)
  store ptr %59, ptr %5, align 8, !tbaa !12
  store i64 %57, ptr %31, align 8, !tbaa !15
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %60 unwind label %43

60:                                               ; preds = %58, %47
  %.131 = phi i64 [ %57, %58 ], [ %.03045, %47 ]
  %61 = call noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload)
  %62 = icmp sgt i8 %61, 1
  br i1 %62, label %63, label %68

63:                                               ; preds = %60
  %64 = call noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload, i8 noundef signext 2)
  %65 = add nsw i64 %.131, 1
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef %64, i64 noundef %.sroa.17.0.copyload, i64 noundef %65, i8 noundef signext 2)
          to label %66 unwind label %43

66:                                               ; preds = %63
  %67 = call noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload, i8 noundef signext 2)
  store ptr %67, ptr %5, align 8, !tbaa !12
  store i64 %65, ptr %31, align 8, !tbaa !15
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %68 unwind label %43

68:                                               ; preds = %66, %60
  %.232 = phi i64 [ %65, %66 ], [ %.131, %60 ]
  %69 = call noundef signext i8 @_ZN15data_structures8tree_2344Node8GetCountEv(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload)
  %70 = icmp sgt i8 %69, 2
  br i1 %70, label %71, label %76

71:                                               ; preds = %68
  %72 = call noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload, i8 noundef signext 3)
  %73 = add nsw i64 %.232, 1
  invoke void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef %72, i64 noundef %.sroa.17.0.copyload, i64 noundef %73, i8 noundef signext 3)
          to label %74 unwind label %43

74:                                               ; preds = %71
  %75 = call noundef ptr @_ZN15data_structures8tree_2344Node8GetChildEa(ptr noundef nonnull align 8 dereferenceable(57) %.sroa.0.0.copyload, i8 noundef signext 3)
  store ptr %75, ptr %5, align 8, !tbaa !12
  store i64 %73, ptr %31, align 8, !tbaa !15
  invoke void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE4pushERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %76 unwind label %43

76:                                               ; preds = %68, %74, %45
  %.333 = phi i64 [ %.03045, %45 ], [ %73, %74 ], [ %.232, %68 ]
  %77 = call noundef zeroext i1 @_ZNKSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  br i1 %77, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %76, %.preheader
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %79

78:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %84

79:                                               ; preds = %._crit_edge, %26
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.19)
          to label %81 unwind label %39

81:                                               ; preds = %79
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %82 unwind label %39

82:                                               ; preds = %81
  call void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  br label %83

83:                                               ; preds = %17, %82
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #6
  ret void

84:                                               ; preds = %78, %39
  %.pn.pn = phi { ptr, i32 } [ %.pn, %78 ], [ %40, %39 ]
  call void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  br label %85

85:                                               ; preds = %84, %37
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %84 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  br label %86

86:                                               ; preds = %85, %19
  %.pn43 = phi { ptr, i32 } [ %20, %19 ], [ %.pn.pn.pn, %85 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn43
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15data_structures8tree_2347Tree2349PrintNodeERSt14basic_ofstreamIcSt11char_traitsIcEEPNS0_4NodeElla(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i64 noundef, i64 noundef, i8 noundef signext) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNKSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZNSt5queueIZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfoSt5dequeIS5_SaIS5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #5 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 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 = { noreturn 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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"_ZTSN15data_structures8tree_2347Tree234E", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"_ZTSZN15data_structures8tree_2347Tree2345PrintEPKcE8NodeInfo", !10, i64 0, !14, i64 8}
!14 = !{!"long", !11, i64 0}
!15 = !{!13, !14, i64 8}
!16 = !{!10, !10, i64 0}
!17 = !{!14, !14, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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