; LLVM IR from thepowersgang/mrustc :: src/parse/tokenstream.ll (ZN11TokenStream9lookaheadEj)

; 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 }
%"class.std::allocator" = type { i8 }
%"struct.TokenStream::LookaheadEnt" = type { %class.Token, i32, %"class.Ident::Hygiene" }
%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 }

@g_debug_indent_level = external global i32, align 4
@_ZTIN12CompileError8BugCheckE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@__FUNCTION__._ZN11TokenStream9lookaheadEj = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11TokenStream13innerGetTokenEv(ptr dead_on_unwind noalias writable sret(%class.Token) align 8, ptr noundef nonnull align 8 dereferenceable(176)) #2 align 2

declare noundef zeroext i1 @_Z13debug_enabledv() #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) #4

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88)) #5 align 2

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare void @_ZN12CompileError8BugCheckC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CompileError8BugCheckD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11TokenStream9lookaheadEj(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i1, align 1
  %13 = alloca %class.Token, align 8
  %14 = alloca %"class.Ident::Hygiene", align 8
  %15 = alloca %"struct.TokenStream::LookaheadEnt", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 3, ptr %6, align 4, !tbaa !9
  %17 = getelementptr inbounds %class.TokenStream, ptr %16, i32 0, i32 1
  %18 = load i8, ptr %17, align 8, !tbaa !11, !range !34, !noundef !35
  %19 = trunc i8 %18 to i1
  br i1 %19, label %20, label %29

20:                                               ; preds = %2
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  %24 = getelementptr inbounds %class.TokenStream, ptr %16, i32 0, i32 2
  %25 = call noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88) %24)
  store i32 %25, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %131

26:                                               ; preds = %20
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = add i32 %27, -1
  store i32 %28, ptr %5, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %26, %2
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = icmp uge i32 %30, 3
  br i1 %31, label %32, label %48

32:                                               ; preds = %29
  store i1 true, ptr %12, align 1
  %33 = call ptr @__cxa_allocate_exception(i64 40) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %34 unwind label %36

34:                                               ; preds = %32
  invoke void @_ZN12CompileError8BugCheckC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef %8)
          to label %35 unwind label %40

35:                                               ; preds = %34
  store i1 false, ptr %12, align 1
  invoke void @__cxa_throw(ptr %33, ptr @_ZTIN12CompileError8BugCheckE, ptr @_ZN12CompileError8BugCheckD2Ev) #8
          to label %139 unwind label %40

36:                                               ; preds = %32
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %10, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %11, align 4
  br label %44

40:                                               ; preds = %35, %34
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %10, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %44

44:                                               ; preds = %40, %36
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  %45 = load i1, ptr %12, align 1
  br i1 %45, label %46, label %47

46:                                               ; preds = %44
  call void @__cxa_free_exception(ptr %33) #7
  br label %47

47:                                               ; preds = %46, %44
  br label %133

48:                                               ; preds = %29
  br label %49

49:                                               ; preds = %85, %48
  %50 = load i32, ptr %5, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds %class.TokenStream, ptr %16, i32 0, i32 5
  %53 = call noundef i64 @_ZNKSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #7
  %54 = icmp uge i64 %51, %53
  br i1 %54, label %55, label %104

55:                                               ; preds = %49
  br label %56

56:                                               ; preds = %55
  %57 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %57, label %58, label %67

58:                                               ; preds = %56
  %59 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %59, ptr noundef @__FUNCTION__._ZN11TokenStream9lookaheadEj)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef @.str.10)
  %62 = getelementptr inbounds %class.TokenStream, ptr %16, i32 0, i32 5
  %63 = call noundef i64 @_ZNKSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #7
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %61, i64 noundef %63)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef @_ZSt3decRSt8ios_base)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %67

67:                                               ; preds = %58, %56
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 88, ptr %13) #7
  call void @_ZN11TokenStream13innerGetTokenEv(ptr dead_on_unwind writable sret(%class.Token) align 8 %13, ptr noundef nonnull align 8 dereferenceable(176) %16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %70 = load ptr, ptr %16, align 8, !tbaa !36
  %71 = getelementptr inbounds ptr, ptr %70, i64 8
  %72 = load ptr, ptr %71, align 8
  invoke void %72(ptr dead_on_unwind writable sret(%"class.Ident::Hygiene") align 8 %14, ptr noundef nonnull align 8 dereferenceable(176) %16)
          to label %73 unwind label %86

73:                                               ; preds = %69
  %74 = getelementptr inbounds %class.TokenStream, ptr %16, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 104, ptr %15) #7
  %75 = getelementptr inbounds %"struct.TokenStream::LookaheadEnt", ptr %15, i32 0, i32 0
  invoke void @_ZN5TokenC2EOS_(ptr noundef nonnull align 8 dereferenceable(88) %75, ptr noundef nonnull align 8 dereferenceable(88) %13)
          to label %76 unwind label %90

76:                                               ; preds = %73
  %77 = getelementptr inbounds %"struct.TokenStream::LookaheadEnt", ptr %15, i32 0, i32 1
  %78 = load ptr, ptr %16, align 8, !tbaa !36
  %79 = getelementptr inbounds ptr, ptr %78, i64 7
  %80 = load ptr, ptr %79, align 8
  %81 = invoke noundef i32 %80(ptr noundef nonnull align 8 dereferenceable(176) %16)
          to label %82 unwind label %94

82:                                               ; preds = %76
  store i32 %81, ptr %77, align 8, !tbaa !38
  %83 = getelementptr inbounds %"struct.TokenStream::LookaheadEnt", ptr %15, i32 0, i32 2
  invoke void @_ZN5Ident7HygieneC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %84 unwind label %94

84:                                               ; preds = %82
  invoke void @_ZNSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %74, ptr noundef nonnull align 8 dereferenceable(104) %15)
          to label %85 unwind label %98

85:                                               ; preds = %84
  call void @_ZN11TokenStream12LookaheadEntD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %15) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %15) #7
  call void @_ZN5Ident7HygieneD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %13) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr %13) #7
  br label %49, !llvm.loop !40

86:                                               ; preds = %69
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %10, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %11, align 4
  br label %103

90:                                               ; preds = %73
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %10, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %11, align 4
  br label %102

94:                                               ; preds = %82, %76
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %10, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %11, align 4
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %75) #7
  br label %102

98:                                               ; preds = %84
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %10, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %11, align 4
  call void @_ZN11TokenStream12LookaheadEntD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %15) #7
  br label %102

102:                                              ; preds = %98, %94, %90
  call void @llvm.lifetime.end.p0(i64 104, ptr %15) #7
  call void @_ZN5Ident7HygieneD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %103

103:                                              ; preds = %102, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %13) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr %13) #7
  br label %133

104:                                              ; preds = %49
  br label %105

105:                                              ; preds = %104
  %106 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %106, label %107, label %122

107:                                              ; preds = %105
  %108 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %108, ptr noundef @__FUNCTION__._ZN11TokenStream9lookaheadEj)
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef @.str.11)
  %111 = load i32, ptr %5, align 4, !tbaa !9
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %110, i32 noundef %111)
  %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.12)
  %114 = getelementptr inbounds %class.TokenStream, ptr %16, i32 0, i32 5
  %115 = load i32, ptr %5, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN11TokenStream12LookaheadEntESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %116) #7
  %118 = getelementptr inbounds %"struct.TokenStream::LookaheadEnt", ptr %117, i32 0, i32 0
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Token(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef nonnull align 8 dereferenceable(88) %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 = %107, %105
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  %125 = getelementptr inbounds %class.TokenStream, ptr %16, i32 0, i32 5
  %126 = load i32, ptr %5, align 4, !tbaa !9
  %127 = zext i32 %126 to i64
  %128 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN11TokenStream12LookaheadEntESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef %127) #7
  %129 = getelementptr inbounds %"struct.TokenStream::LookaheadEnt", ptr %128, i32 0, i32 0
  %130 = call noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88) %129)
  store i32 %130, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %131

131:                                              ; preds = %124, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %132 = load i32, ptr %3, align 4
  ret i32 %132

133:                                              ; preds = %103, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %10, align 8
  %136 = load i32, ptr %11, align 4
  %137 = insertvalue { ptr, i32 } poison, ptr %135, 0
  %138 = insertvalue { ptr, i32 } %137, i32 %136, 1
  resume { ptr, i32 } %138

139:                                              ; preds = %35
  unreachable
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN11TokenStream12LookaheadEntESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

attributes #0 = { 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 #1 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTS11TokenStream", !13, i64 8, !14, i64 16, !21, i64 104, !28, i64 112, !29, i64 120, !33, i64 144}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTS5Token", !15, i64 8, !16, i64 16, !18, i64 56, !21, i64 80}
!15 = !{!"_ZTS10eTokenType", !7, i64 0}
!16 = !{!"_ZTSN5Token4DataE", !17, i64 0, !7, i64 8}
!17 = !{!"_ZTSN5Token4Data3TagE", !7, i64 0}
!18 = !{!"_ZTS8Position", !19, i64 0, !20, i64 8, !10, i64 16, !10, i64 20}
!19 = !{!"_ZTS4Span", !6, i64 0}
!20 = !{!"_ZTS8RcString", !6, i64 0}
!21 = !{!"_ZTSN5Ident7HygieneE", !22, i64 0}
!22 = !{!"_ZTSSt10unique_ptrIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt15__uniq_ptr_dataIN5Ident7Hygiene5InnerESt14default_deleteIS2_ELb1ELb1EE", !24, i64 0}
!24 = !{!"_ZTSSt15__uniq_ptr_implIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt5tupleIJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !26, i64 0}
!26 = !{!"_ZTSSt11_Tuple_implILm0EJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !27, i64 0}
!27 = !{!"_ZTSSt10_Head_baseILm0EPN5Ident7Hygiene5InnerELb0EE", !6, i64 0}
!28 = !{!"_ZTSN3AST7EditionE", !7, i64 0}
!29 = !{!"_ZTSSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTS10ParseState", !13, i64 0, !13, i64 1, !13, i64 2, !6, i64 8, !6, i64 16, !6, i64 24}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!37, !37, i64 0}
!37 = !{!"vtable pointer", !8, i64 0}
!38 = !{!39, !28, i64 88}
!39 = !{!"_ZTSN11TokenStream12LookaheadEntE", !14, i64 0, !28, i64 88, !21, i64 96}
!40 = distinct !{!40, !41}
!41 = !{!"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 }
%"class.std::allocator" = type { i8 }
%"struct.TokenStream::LookaheadEnt" = type { %class.Token, i32, %"class.Ident::Hygiene" }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@_ZTIN12CompileError8BugCheckE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@__FUNCTION__._ZN11TokenStream9lookaheadEj = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11TokenStream13innerGetTokenEv(ptr dead_on_unwind noalias writable sret(%class.Token) align 8, ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #2 align 2

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #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 #4

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 #3

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #5 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare void @_ZN12CompileError8BugCheckC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CompileError8BugCheckD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11TokenStream9lookaheadEj(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %class.Token, align 8
  %6 = alloca %"class.Ident::Hygiene", align 8
  %7 = alloca %"struct.TokenStream::LookaheadEnt", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i8, ptr %8, align 8, !tbaa !5, !range !32, !noundef !33
  %10 = trunc nuw i8 %9 to i1
  br i1 %10, label %11, label %18

11:                                               ; preds = %2
  %12 = icmp eq i32 %1, 0
  br i1 %12, label %13, label %16

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = tail call noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88) %14)
  br label %80

16:                                               ; preds = %11
  %17 = add i32 %1, -1
  br label %18

18:                                               ; preds = %16, %2
  %.018 = phi i32 [ %17, %16 ], [ %1, %2 ]
  %19 = icmp ugt i32 %.018, 2
  br i1 %19, label %25, label %.preheader

.preheader:                                       ; preds = %18
  %20 = zext nneg i32 %.018 to i64
  %21 = getelementptr inbounds i8, ptr %0, i64 120
  %22 = tail call noundef i64 @_ZNKSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  %.not38 = icmp ugt i64 %22, %20
  br i1 %.not38, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %23 = getelementptr inbounds i8, ptr %7, i64 88
  %24 = getelementptr inbounds i8, ptr %7, i64 96
  br label %33

25:                                               ; preds = %18
  %26 = tail call ptr @__cxa_allocate_exception(i64 40) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %27 unwind label %.thread

27:                                               ; preds = %25
  invoke void @_ZN12CompileError8BugCheckC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef nonnull %3)
          to label %28 unwind label %30

28:                                               ; preds = %27
  invoke void @__cxa_throw(ptr nonnull %26, ptr nonnull @_ZTIN12CompileError8BugCheckE, ptr nonnull @_ZN12CompileError8BugCheckD2Ev) #8
          to label %82 unwind label %30

.thread:                                          ; preds = %25
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  br label %32

30:                                               ; preds = %27, %28
  %.0 = phi i1 [ false, %28 ], [ true, %27 ]
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  br i1 %.0, label %32, label %81

32:                                               ; preds = %.thread, %30
  %.pn2328 = phi { ptr, i32 } [ %29, %.thread ], [ %31, %30 ]
  call void @__cxa_free_exception(ptr %26) #7
  br label %81

33:                                               ; preds = %.lr.ph, %54
  %34 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %34, label %35, label %43

35:                                               ; preds = %33
  %36 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !34
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %36, ptr noundef nonnull @__FUNCTION__._ZN11TokenStream9lookaheadEj)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull @.str.10)
  %39 = call noundef i64 @_ZNKSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %38, i64 noundef %39)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %43

43:                                               ; preds = %35, %33
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %5) #7
  call void @_ZN11TokenStream13innerGetTokenEv(ptr dead_on_unwind nonnull writable sret(%class.Token) align 8 %5, ptr noundef nonnull align 8 dereferenceable(176) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %44 = load ptr, ptr %0, align 8, !tbaa !35
  %45 = getelementptr inbounds i8, ptr %44, i64 64
  %46 = load ptr, ptr %45, align 8
  invoke void %46(ptr dead_on_unwind nonnull writable sret(%"class.Ident::Hygiene") align 8 %6, ptr noundef nonnull align 8 dereferenceable(176) %0)
          to label %47 unwind label %56

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %7) #7
  invoke void @_ZN5TokenC2EOS_(ptr noundef nonnull align 8 dereferenceable(88) %7, ptr noundef nonnull align 8 dereferenceable(88) %5)
          to label %48 unwind label %58

48:                                               ; preds = %47
  %49 = load ptr, ptr %0, align 8, !tbaa !35
  %50 = getelementptr inbounds i8, ptr %49, i64 56
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef i32 %51(ptr noundef nonnull align 8 dereferenceable(176) %0)
          to label %53 unwind label %60

53:                                               ; preds = %48
  store i32 %52, ptr %23, align 8, !tbaa !37
  call void @_ZN5Ident7HygieneC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %6)
  invoke void @_ZNSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(104) %7)
          to label %54 unwind label %62

54:                                               ; preds = %53
  call void @_ZN11TokenStream12LookaheadEntD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %7) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #7
  call void @_ZN5Ident7HygieneD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #7
  %55 = call noundef i64 @_ZNKSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  %.not = icmp ugt i64 %55, %20
  br i1 %.not, label %._crit_edge, label %33, !llvm.loop !39

56:                                               ; preds = %43
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %65

58:                                               ; preds = %47
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %64

60:                                               ; preds = %48
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #7
  br label %64

62:                                               ; preds = %53
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11TokenStream12LookaheadEntD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %7) #7
  br label %64

64:                                               ; preds = %62, %60, %58
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #7
  call void @_ZN5Ident7HygieneD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %65

65:                                               ; preds = %64, %56
  %.pn.pn = phi { ptr, i32 } [ %.pn, %64 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #7
  br label %81

._crit_edge:                                      ; preds = %54, %.preheader
  %66 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %66, label %67, label %77

67:                                               ; preds = %._crit_edge
  %68 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !34
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %68, ptr noundef nonnull @__FUNCTION__._ZN11TokenStream9lookaheadEj)
  %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.11)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %70, i32 noundef %.018)
  %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.12)
  %73 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN11TokenStream12LookaheadEntESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %20) #7
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Token(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(88) %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 %77

77:                                               ; preds = %67, %._crit_edge
  %78 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN11TokenStream12LookaheadEntESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %20) #7
  %79 = call noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88) %78)
  br label %80

80:                                               ; preds = %77, %13
  %.017 = phi i32 [ %15, %13 ], [ %79, %77 ]
  ret i32 %.017

81:                                               ; preds = %30, %32, %65
  %.pn23.pn = phi { ptr, i32 } [ %.pn2328, %32 ], [ %31, %30 ], [ %.pn.pn, %65 ]
  resume { ptr, i32 } %.pn23.pn

82:                                               ; preds = %28
  unreachable
}

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTS11TokenStream", !7, i64 8, !10, i64 16, !19, i64 104, !26, i64 112, !27, i64 120, !31, i64 144}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS5Token", !11, i64 8, !12, i64 16, !14, i64 56, !19, i64 80}
!11 = !{!"_ZTS10eTokenType", !8, i64 0}
!12 = !{!"_ZTSN5Token4DataE", !13, i64 0, !8, i64 8}
!13 = !{!"_ZTSN5Token4Data3TagE", !8, i64 0}
!14 = !{!"_ZTS8Position", !15, i64 0, !17, i64 8, !18, i64 16, !18, i64 20}
!15 = !{!"_ZTS4Span", !16, i64 0}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTS8RcString", !16, i64 0}
!18 = !{!"int", !8, i64 0}
!19 = !{!"_ZTSN5Ident7HygieneE", !20, i64 0}
!20 = !{!"_ZTSSt10unique_ptrIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !21, i64 0}
!21 = !{!"_ZTSSt15__uniq_ptr_dataIN5Ident7Hygiene5InnerESt14default_deleteIS2_ELb1ELb1EE", !22, i64 0}
!22 = !{!"_ZTSSt15__uniq_ptr_implIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt5tupleIJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !24, i64 0}
!24 = !{!"_ZTSSt11_Tuple_implILm0EJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !25, i64 0}
!25 = !{!"_ZTSSt10_Head_baseILm0EPN5Ident7Hygiene5InnerELb0EE", !16, i64 0}
!26 = !{!"_ZTSN3AST7EditionE", !8, i64 0}
!27 = !{!"_ZTSSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!31 = !{!"_ZTS10ParseState", !7, i64 0, !7, i64 1, !7, i64 2, !16, i64 8, !16, i64 16, !16, i64 24}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!18, !18, i64 0}
!35 = !{!36, !36, i64 0}
!36 = !{!"vtable pointer", !9, i64 0}
!37 = !{!38, !26, i64 88}
!38 = !{!"_ZTSN11TokenStream12LookaheadEntE", !10, i64 0, !26, i64 88, !19, i64 96}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}


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