; LLVM IR from thepowersgang/mrustc :: src/parse/ttstream.ll (ZN8TTStream12realGetTokenEv)

; 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.Token = type { ptr, i32, %"class.Token::Data", %class.Position, %"class.Ident::Hygiene" }
%"class.Token::Data" = type { i32, %"union.Token::Data::DataUnion" }
%"union.Token::Data::DataUnion" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.Position = type { %struct.Span, %class.RcString, i32, i32 }
%struct.Span = type { ptr }
%class.RcString = type { ptr }
%"class.Ident::Hygiene" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"struct.std::pair" = type { i32, ptr }
%"struct.std::pair.15" = type { i32, ptr }
%class.TTStream = type { %class.TokenStream, %"class.std::vector.5", %struct.Span, i32, ptr }
%class.TokenStream = type { ptr, i8, %class.Token, %"class.Ident::Hygiene", i32, %"class.std::vector", %struct.ParseState }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<TokenStream::LookaheadEnt, std::allocator<TokenStream::LookaheadEnt>>::_Vector_impl" }
%"struct.std::_Vector_base<TokenStream::LookaheadEnt, std::allocator<TokenStream::LookaheadEnt>>::_Vector_impl" = type { %"struct.std::_Vector_base<TokenStream::LookaheadEnt, std::allocator<TokenStream::LookaheadEnt>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TokenStream::LookaheadEnt, std::allocator<TokenStream::LookaheadEnt>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ParseState = type { i8, i8, i8, ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::pair<unsigned int, const TokenTree *>, std::allocator<std::pair<unsigned int, const TokenTree *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, const TokenTree *>, std::allocator<std::pair<unsigned int, const TokenTree *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, const TokenTree *>, std::allocator<std::pair<unsigned int, const TokenTree *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, const TokenTree *>, std::allocator<std::pair<unsigned int, const TokenTree *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@g_debug_indent_level = external global i32, align 4
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [77 x i8], align 1
@__PRETTY_FUNCTION__._ZN8TTStream12realGetTokenEv = external hidden unnamed_addr constant [39 x i8], align 1
@__FUNCTION__._ZN8TTStream12realGetTokenEv = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1

declare noundef zeroext i1 @_Z13debug_enabledv() #0

; 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) #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

; 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)) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, ptr } @_ZSt9make_pairIiPK9TokenTreeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8TTStream12realGetTokenEv(ptr dead_on_unwind noalias writable sret(%class.Token) align 8 %0, ptr noundef nonnull align 8 dereferenceable(224) %1) unnamed_addr #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::pair.15", align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  br label %14

14:                                               ; preds = %169, %2
  %15 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  %16 = call noundef i64 @_ZNKSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %17 = icmp ugt i64 %16, 0
  br i1 %17, label %18, label %170

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %19 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  %21 = getelementptr inbounds %"struct.std::pair", ptr %20, i32 0, i32 0
  store ptr %21, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  %24 = getelementptr inbounds %"struct.std::pair", ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %18
  br label %30

28:                                               ; preds = %18
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 33, ptr noundef @__PRETTY_FUNCTION__._ZN8TTStream12realGetTokenEv) #7
  unreachable

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %31 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #6
  %33 = getelementptr inbounds %"struct.std::pair", ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  store ptr %34, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %63

38:                                               ; preds = %30
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZNK9TokenTree8is_tokenEv(ptr noundef nonnull align 8 dereferenceable(136) %39)
  br i1 %40, label %41, label %63

41:                                               ; preds = %38
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load i32, ptr %42, align 4, !tbaa !12
  %44 = add i32 %43, 1
  store i32 %44, ptr %42, align 4, !tbaa !12
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9TokenTree7hygieneEv(ptr noundef nonnull align 8 dereferenceable(136) %45)
  %47 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 4
  store ptr %46, ptr %47, align 8, !tbaa !13
  br label %48

48:                                               ; preds = %41
  %49 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %49, label %50, label %58

50:                                               ; preds = %48
  %51 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !12
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %51, ptr noundef @__FUNCTION__._ZN8TTStream12realGetTokenEv)
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136) %53)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Token(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(88) %54)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @_ZSt3decRSt8ios_base)
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %58

58:                                               ; preds = %50, %48
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136) %61)
  call void @_ZN5TokenC1ERKS_(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(88) %62)
  store i32 1, ptr %7, align 4
  br label %167

63:                                               ; preds = %38, %30
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load i32, ptr %64, align 4, !tbaa !12
  %66 = zext i32 %65 to i64
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call noundef i64 @_ZNK9TokenTree4sizeEv(ptr noundef nonnull align 8 dereferenceable(136) %67)
  %69 = icmp ult i64 %66, %68
  br i1 %69, label %70, label %133

70:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = load i32, ptr %72, align 4, !tbaa !12
  %74 = call noundef nonnull align 8 dereferenceable(136) ptr @_ZNK9TokenTreeixEj(ptr noundef nonnull align 8 dereferenceable(136) %71, i32 noundef %73)
  store ptr %74, ptr %8, align 8, !tbaa !5
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = load i32, ptr %75, align 4, !tbaa !12
  %77 = add i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !12
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = call noundef i64 @_ZNK9TokenTree4sizeEv(ptr noundef nonnull align 8 dereferenceable(136) %78)
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %100

81:                                               ; preds = %70
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9TokenTree7hygieneEv(ptr noundef nonnull align 8 dereferenceable(136) %82)
  %84 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 4
  store ptr %83, ptr %84, align 8, !tbaa !13
  br label %85

85:                                               ; preds = %81
  %86 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %86, label %87, label %95

87:                                               ; preds = %85
  %88 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !12
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %88, ptr noundef @__FUNCTION__._ZN8TTStream12realGetTokenEv)
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136) %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Token(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull align 8 dereferenceable(88) %91)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef @_ZSt3decRSt8ios_base)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %95

95:                                               ; preds = %87, %85
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136) %98)
  call void @_ZNK5Token5cloneEv(ptr dead_on_unwind writable sret(%class.Token) align 8 %0, ptr noundef nonnull align 8 dereferenceable(88) %99)
  store i32 1, ptr %7, align 4
  br label %130

100:                                              ; preds = %70
  %101 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %102, ptr %12, align 8, !tbaa !5
  %103 = call { i32, ptr } @_ZSt9make_pairIiPK9TokenTreeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %104 = getelementptr inbounds { i32, ptr }, ptr %10, i32 0, i32 0
  %105 = extractvalue { i32, ptr } %103, 0
  store i32 %105, ptr %104, align 8
  %106 = getelementptr inbounds { i32, ptr }, ptr %10, i32 0, i32 1
  %107 = extractvalue { i32, ptr } %103, 1
  store ptr %107, ptr %106, align 8
  call void @_ZNSt4pairIjPK9TokenTreeEC2IiS2_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS6_S7_EEclsr6_PCCFPIS6_S7_EE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS_IS6_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %10)
  call void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %101, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %108

108:                                              ; preds = %100
  %109 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %109, label %110, label %122

110:                                              ; preds = %108
  %111 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !12
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %111, ptr noundef @__FUNCTION__._ZN8TTStream12realGetTokenEv)
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef @.str.3)
  %114 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 3
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef nonnull align 4 dereferenceable(4) %114)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @.str.6)
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %117)
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull align 4 dereferenceable(4) %118)
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef @_ZSt3decRSt8ios_base)
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %122

122:                                              ; preds = %110, %108
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %125)
  %127 = load i32, ptr %126, align 4, !tbaa !41
  %128 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 3
  store i32 %127, ptr %128, align 8, !tbaa !42
  br label %129

129:                                              ; preds = %124
  store i32 0, ptr %7, align 4
  br label %130

130:                                              ; preds = %129, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %131 = load i32, ptr %7, align 4
  switch i32 %131, label %167 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %166

133:                                              ; preds = %63
  %134 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  call void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %134) #6
  %135 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  %136 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #6
  br i1 %136, label %165, label %137

137:                                              ; preds = %133
  br label %138

138:                                              ; preds = %137
  %139 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %139, label %140, label %155

140:                                              ; preds = %138
  %141 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !12
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %141, ptr noundef @__FUNCTION__._ZN8TTStream12realGetTokenEv)
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef @.str.7)
  %144 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 3
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef nonnull align 4 dereferenceable(4) %144)
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef @.str.6)
  %147 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  %148 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %147) #6
  %149 = getelementptr inbounds %"struct.std::pair", ptr %148, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %150)
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull align 4 dereferenceable(4) %151)
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef @_ZSt3decRSt8ios_base)
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %155

155:                                              ; preds = %140, %138
  br label %156

156:                                              ; preds = %155
  br label %157

157:                                              ; preds = %156
  %158 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 1
  %159 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %158) #6
  %160 = getelementptr inbounds %"struct.std::pair", ptr %159, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !9
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %161)
  %163 = load i32, ptr %162, align 4, !tbaa !41
  %164 = getelementptr inbounds %class.TTStream, ptr %13, i32 0, i32 3
  store i32 %163, ptr %164, align 8, !tbaa !42
  br label %165

165:                                              ; preds = %157, %133
  br label %166

166:                                              ; preds = %165, %132
  store i32 0, ptr %7, align 4
  br label %167

167:                                              ; preds = %166, %130, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %168 = load i32, ptr %7, align 4
  switch i32 %168, label %172 [
    i32 0, label %169
    i32 1, label %171
  ]

169:                                              ; preds = %167
  br label %14, !llvm.loop !43

170:                                              ; preds = %14
  call void @_ZN5TokenC1E10eTokenType(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1)
  br label %171

171:                                              ; preds = %170, %167
  ret void

172:                                              ; preds = %167
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9TokenTree7hygieneEv(ptr noundef nonnull align 8 dereferenceable(136)) #4 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Token(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(88)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136)) #4 align 2

declare void @_ZN5TokenC1ERKS_(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9TokenTree4sizeEv(ptr noundef nonnull align 8 dereferenceable(136)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(136) ptr @_ZNK9TokenTreeixEj(ptr noundef nonnull align 8 dereferenceable(136), i32 noundef) #4 align 2

declare void @_ZNK5Token5cloneEv(ptr dead_on_unwind writable sret(%class.Token) align 8, ptr noundef nonnull align 8 dereferenceable(88)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

declare void @_ZN5TokenC1E10eTokenType(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) unnamed_addr #0

attributes #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 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTSSt4pairIjPK9TokenTreeE", !11, i64 0, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !6, i64 216}
!14 = !{!"_ZTS8TTStream", !15, i64 0, !37, i64 176, !22, i64 200, !31, i64 208, !6, i64 216}
!15 = !{!"_ZTS11TokenStream", !16, i64 8, !17, i64 16, !24, i64 104, !31, i64 112, !32, i64 120, !36, i64 144}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTS5Token", !18, i64 8, !19, i64 16, !21, i64 56, !24, i64 80}
!18 = !{!"_ZTS10eTokenType", !7, i64 0}
!19 = !{!"_ZTSN5Token4DataE", !20, i64 0, !7, i64 8}
!20 = !{!"_ZTSN5Token4Data3TagE", !7, i64 0}
!21 = !{!"_ZTS8Position", !22, i64 0, !23, i64 8, !11, i64 16, !11, i64 20}
!22 = !{!"_ZTS4Span", !6, i64 0}
!23 = !{!"_ZTS8RcString", !6, i64 0}
!24 = !{!"_ZTSN5Ident7HygieneE", !25, i64 0}
!25 = !{!"_ZTSSt10unique_ptrIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !26, i64 0}
!26 = !{!"_ZTSSt15__uniq_ptr_dataIN5Ident7Hygiene5InnerESt14default_deleteIS2_ELb1ELb1EE", !27, i64 0}
!27 = !{!"_ZTSSt15__uniq_ptr_implIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !28, i64 0}
!28 = !{!"_ZTSSt5tupleIJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !29, i64 0}
!29 = !{!"_ZTSSt11_Tuple_implILm0EJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !30, i64 0}
!30 = !{!"_ZTSSt10_Head_baseILm0EPN5Ident7Hygiene5InnerELb0EE", !6, i64 0}
!31 = !{!"_ZTSN3AST7EditionE", !7, i64 0}
!32 = !{!"_ZTSSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTS10ParseState", !16, i64 0, !16, i64 1, !16, i64 2, !6, i64 8, !6, i64 16, !6, i64 24}
!37 = !{!"_ZTSSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!31, !31, i64 0}
!42 = !{!14, !31, i64 208}
!43 = distinct !{!43, !44}
!44 = !{!"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.Token = type { ptr, i32, %"class.Token::Data", %class.Position, %"class.Ident::Hygiene" }
%"class.Token::Data" = type { i32, %"union.Token::Data::DataUnion" }
%"union.Token::Data::DataUnion" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.Position = type { %struct.Span, %class.RcString, i32, i32 }
%struct.Span = type { ptr }
%class.RcString = type { ptr }
%"class.Ident::Hygiene" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"struct.std::pair" = type { i32, ptr }
%"struct.std::pair.15" = type { i32, ptr }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [77 x i8], align 1
@__PRETTY_FUNCTION__._ZN8TTStream12realGetTokenEv = external hidden unnamed_addr constant [39 x i8], align 1
@__FUNCTION__._ZN8TTStream12realGetTokenEv = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #0

; 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 #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

; 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)) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, ptr } @_ZSt9make_pairIiPK9TokenTreeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8TTStream12realGetTokenEv(ptr dead_on_unwind noalias writable sret(%class.Token) align 8 %0, ptr noundef nonnull align 8 dereferenceable(224) %1) unnamed_addr #2 align 2 {
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"struct.std::pair.15", align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = getelementptr inbounds i8, ptr %1, i64 176
  %8 = tail call noundef i64 @_ZNKSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %.not30 = icmp eq i64 %8, 0
  br i1 %.not30, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %9 = getelementptr inbounds i8, ptr %1, i64 208
  %10 = getelementptr inbounds i8, ptr %4, i64 8
  br label %11

11:                                               ; preds = %.lr.ph, %100
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %.not20 = icmp eq ptr %15, null
  br i1 %.not20, label %16, label %17

16:                                               ; preds = %11
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 33, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8TTStream12realGetTokenEv) #7
  unreachable

17:                                               ; preds = %11
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = load i32, ptr %12, align 8, !tbaa !11
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %._crit_edge38

23:                                               ; preds = %17
  %24 = call noundef zeroext i1 @_ZNK9TokenTree8is_tokenEv(ptr noundef nonnull align 8 dereferenceable(136) %20)
  %25 = load i32, ptr %12, align 8, !tbaa !11
  br i1 %24, label %26, label %._crit_edge38

26:                                               ; preds = %23
  %27 = add i32 %25, 1
  store i32 %27, ptr %12, align 8, !tbaa !11
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9TokenTree7hygieneEv(ptr noundef nonnull align 8 dereferenceable(136) %20)
  %29 = getelementptr inbounds i8, ptr %1, i64 216
  store ptr %28, ptr %29, align 8, !tbaa !12
  %30 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %30, label %31, label %38

31:                                               ; preds = %26
  %32 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !11
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %32, ptr noundef nonnull @__FUNCTION__._ZN8TTStream12realGetTokenEv)
  %34 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136) %20)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Token(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(88) %34)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %38

38:                                               ; preds = %31, %26
  %39 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136) %20)
  call void @_ZN5TokenC1ERKS_(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(88) %39)
  br label %.thread22

._crit_edge38:                                    ; preds = %23, %17
  %40 = phi i32 [ %21, %17 ], [ %25, %23 ]
  %41 = zext i32 %40 to i64
  %42 = call noundef i64 @_ZNK9TokenTree4sizeEv(ptr noundef nonnull align 8 dereferenceable(136) %20)
  %43 = icmp ugt i64 %42, %41
  br i1 %43, label %44, label %77

44:                                               ; preds = %._crit_edge38
  %45 = load i32, ptr %12, align 8, !tbaa !11
  %46 = call noundef nonnull align 8 dereferenceable(136) ptr @_ZNK9TokenTreeixEj(ptr noundef nonnull align 8 dereferenceable(136) %20, i32 noundef %45)
  %47 = load i32, ptr %12, align 8, !tbaa !11
  %48 = add i32 %47, 1
  store i32 %48, ptr %12, align 8, !tbaa !11
  %49 = call noundef i64 @_ZNK9TokenTree4sizeEv(ptr noundef nonnull align 8 dereferenceable(136) %46)
  %.not21 = icmp eq i64 %49, 0
  br i1 %.not21, label %50, label %62

50:                                               ; preds = %44
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9TokenTree7hygieneEv(ptr noundef nonnull align 8 dereferenceable(136) %46)
  %52 = getelementptr inbounds i8, ptr %1, i64 216
  store ptr %51, ptr %52, align 8, !tbaa !12
  %53 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %53, label %54, label %.thread

54:                                               ; preds = %50
  %55 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !11
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %55, ptr noundef nonnull @__FUNCTION__._ZN8TTStream12realGetTokenEv)
  %57 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136) %46)
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Token(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(88) %57)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.thread

.thread:                                          ; preds = %50, %54
  %61 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136) %46)
  call void @_ZNK5Token5cloneEv(ptr dead_on_unwind writable sret(%class.Token) align 8 %0, ptr noundef nonnull align 8 dereferenceable(88) %61)
  br label %.thread22

62:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store ptr %46, ptr %6, align 8, !tbaa !40
  %63 = call { i32, ptr } @_ZSt9make_pairIiPK9TokenTreeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %64 = extractvalue { i32, ptr } %63, 0
  store i32 %64, ptr %4, align 8
  %65 = extractvalue { i32, ptr } %63, 1
  store ptr %65, ptr %10, align 8
  call void @_ZNSt4pairIjPK9TokenTreeEC2IiS2_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS6_S7_EEclsr6_PCCFPIS6_S7_EE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS_IS6_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %66 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %66, label %67, label %.sink.split

67:                                               ; preds = %62
  %68 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !11
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %68, ptr noundef nonnull @__FUNCTION__._ZN8TTStream12realGetTokenEv)
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @.str.3)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull @.str.6)
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %46)
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 4 dereferenceable(4) %73)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.sink.split

77:                                               ; preds = %._crit_edge38
  call void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %78 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br i1 %78, label %100, label %79

79:                                               ; preds = %77
  %80 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %80, label %81, label %94

81:                                               ; preds = %79
  %82 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !11
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %82, ptr noundef nonnull @__FUNCTION__._ZN8TTStream12realGetTokenEv)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull @.str.7)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull @.str.6)
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %89)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 4 dereferenceable(4) %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %94

94:                                               ; preds = %81, %79
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  br label %.sink.split

.sink.split:                                      ; preds = %67, %62, %94
  %.sink = phi ptr [ %97, %94 ], [ %46, %62 ], [ %46, %67 ]
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %.sink)
  %99 = load i32, ptr %98, align 4, !tbaa !41
  store i32 %99, ptr %9, align 8, !tbaa !42
  br label %100

100:                                              ; preds = %.sink.split, %77
  %101 = call noundef i64 @_ZNKSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %.not = icmp eq i64 %101, 0
  br i1 %.not, label %._crit_edge, label %11

._crit_edge:                                      ; preds = %100, %2
  call void @_ZN5TokenC1E10eTokenType(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef 1)
  br label %.thread22

.thread22:                                        ; preds = %.thread, %38, %._crit_edge
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9TokenTree7hygieneEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #4 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Token(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZNK9TokenTree3tokEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #4 align 2

declare void @_ZN5TokenC1ERKS_(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9TokenTree4sizeEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(136) ptr @_ZNK9TokenTreeixEj(ptr noundef nonnull align 8 dereferenceable(136), i32 noundef) local_unnamed_addr #4 align 2

declare void @_ZNK5Token5cloneEv(ptr dead_on_unwind writable sret(%class.Token) align 8, ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

declare void @_ZN5TokenC1E10eTokenType(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) unnamed_addr #0

attributes #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 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 #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, !10, i64 8}
!6 = !{!"_ZTSSt4pairIjPK9TokenTreeE", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 216}
!13 = !{!"_ZTS8TTStream", !14, i64 0, !36, i64 176, !21, i64 200, !30, i64 208, !10, i64 216}
!14 = !{!"_ZTS11TokenStream", !15, i64 8, !16, i64 16, !23, i64 104, !30, i64 112, !31, i64 120, !35, i64 144}
!15 = !{!"bool", !8, i64 0}
!16 = !{!"_ZTS5Token", !17, i64 8, !18, i64 16, !20, i64 56, !23, i64 80}
!17 = !{!"_ZTS10eTokenType", !8, i64 0}
!18 = !{!"_ZTSN5Token4DataE", !19, i64 0, !8, i64 8}
!19 = !{!"_ZTSN5Token4Data3TagE", !8, i64 0}
!20 = !{!"_ZTS8Position", !21, i64 0, !22, i64 8, !7, i64 16, !7, i64 20}
!21 = !{!"_ZTS4Span", !10, i64 0}
!22 = !{!"_ZTS8RcString", !10, i64 0}
!23 = !{!"_ZTSN5Ident7HygieneE", !24, i64 0}
!24 = !{!"_ZTSSt10unique_ptrIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt15__uniq_ptr_dataIN5Ident7Hygiene5InnerESt14default_deleteIS2_ELb1ELb1EE", !26, i64 0}
!26 = !{!"_ZTSSt15__uniq_ptr_implIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !27, i64 0}
!27 = !{!"_ZTSSt5tupleIJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !28, i64 0}
!28 = !{!"_ZTSSt11_Tuple_implILm0EJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !29, i64 0}
!29 = !{!"_ZTSSt10_Head_baseILm0EPN5Ident7Hygiene5InnerELb0EE", !10, i64 0}
!30 = !{!"_ZTSN3AST7EditionE", !8, i64 0}
!31 = !{!"_ZTSSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!35 = !{!"_ZTS10ParseState", !15, i64 0, !15, i64 1, !15, i64 2, !10, i64 8, !10, i64 16, !10, i64 24}
!36 = !{!"_ZTSSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!40 = !{!10, !10, i64 0}
!41 = !{!30, !30, i64 0}
!42 = !{!13, !30, i64 208}


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