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

; 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"

%struct.ParseState = type { i8, i8, i8, ptr, ptr, ptr }
%struct.Span = 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.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 }
%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::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 }
%"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 }
%struct.SpanInner = type { ptr, i64, %struct.Span }

@_ZTV8TTStream = external dso_local unnamed_addr constant { [11 x ptr] }, align 8
@g_debug_indent_level = external global i32, align 4
@__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree = external hidden unnamed_addr constant [9 x i8], align 1
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8TTStreamC2E4Span10ParseStateRK9TokenTree(ptr noundef nonnull align 8 dereferenceable(224) %0, ptr noundef %1, ptr noundef byval(%struct.ParseState) align 8 %2, ptr noundef nonnull align 8 dereferenceable(136) %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.ParseState, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.Span, align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair.15", align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %2, i64 32, i1 false), !tbaa.struct !9
  call void @_ZN11TokenStreamC2E10ParseState(ptr noundef nonnull align 8 dereferenceable(176) %16, ptr noundef byval(%struct.ParseState) align 8 %8)
  store ptr getelementptr inbounds inrange(-16, 72) ({ [11 x ptr] }, ptr @_ZTV8TTStream, i32 0, i32 0, i32 2), ptr %16, align 8, !tbaa !12
  %17 = getelementptr inbounds %class.TTStream, ptr %16, i32 0, i32 1
  call void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  %18 = getelementptr inbounds %class.TTStream, ptr %16, i32 0, i32 2
  invoke void @_ZN4SpanC2EOS_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %19 unwind label %38

19:                                               ; preds = %4
  %20 = getelementptr inbounds %class.TTStream, ptr %16, i32 0, i32 3
  store i32 0, ptr %20, align 8, !tbaa !14
  %21 = getelementptr inbounds %class.TTStream, ptr %16, i32 0, i32 4
  store ptr null, ptr %21, align 8, !tbaa !42
  br label %22

22:                                               ; preds = %19
  %23 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %24 unwind label %42

24:                                               ; preds = %22
  br i1 %23, label %25, label %46

25:                                               ; preds = %24
  %26 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !43
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %26, ptr noundef @__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree)
          to label %28 unwind label %42

28:                                               ; preds = %25
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef @.str)
          to label %30 unwind label %42

30:                                               ; preds = %28
  %31 = getelementptr inbounds %class.TTStream, ptr %16, i32 0, i32 2
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4Span(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %33 unwind label %42

33:                                               ; preds = %30
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef @_ZSt3decRSt8ios_base)
          to label %35 unwind label %42

35:                                               ; preds = %33
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %37 unwind label %42

37:                                               ; preds = %35
  br label %46

38:                                               ; preds = %4
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %9, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %10, align 4
  br label %155

42:                                               ; preds = %134, %129, %127, %125, %122, %120, %117, %114, %108, %106, %104, %101, %99, %96, %93, %35, %33, %30, %28, %25, %22
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %9, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %10, align 4
  br label %154

46:                                               ; preds = %37, %24
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %49 = getelementptr inbounds %class.TTStream, ptr %16, i32 0, i32 2
  invoke void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %50 unwind label %55

50:                                               ; preds = %48
  br label %51

51:                                               ; preds = %90, %50
  %52 = invoke noundef zeroext i1 @_ZNK4SpancvbEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %53 unwind label %59

53:                                               ; preds = %51
  br i1 %52, label %63, label %54

54:                                               ; preds = %53
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %92

55:                                               ; preds = %48
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  br label %91

59:                                               ; preds = %87, %85, %79, %77, %74, %72, %70, %67, %64, %51
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %91

63:                                               ; preds = %53
  br label %64

64:                                               ; preds = %63
  %65 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %66 unwind label %59

66:                                               ; preds = %64
  br i1 %65, label %67, label %82

67:                                               ; preds = %66
  %68 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !43
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %68, ptr noundef @__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree)
          to label %70 unwind label %59

70:                                               ; preds = %67
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef @.str)
          to label %72 unwind label %59

72:                                               ; preds = %70
  %73 = invoke noundef ptr @_ZNK4SpanptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %74 unwind label %59

74:                                               ; preds = %72
  %75 = getelementptr inbounds %struct.SpanInner, ptr %73, i32 0, i32 2
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4Span(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull align 8 dereferenceable(8) %75)
          to label %77 unwind label %59

77:                                               ; preds = %74
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef @_ZSt3decRSt8ios_base)
          to label %79 unwind label %59

79:                                               ; preds = %77
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %81 unwind label %59

81:                                               ; preds = %79
  br label %82

82:                                               ; preds = %81, %66
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84
  %86 = invoke noundef ptr @_ZNK4SpanptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %87 unwind label %59

87:                                               ; preds = %85
  %88 = getelementptr inbounds %struct.SpanInner, ptr %86, i32 0, i32 2
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %88)
          to label %90 unwind label %59

90:                                               ; preds = %87
  br label %51, !llvm.loop !44

91:                                               ; preds = %59, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %154

92:                                               ; preds = %54
  br label %93

93:                                               ; preds = %92
  %94 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %95 unwind label %42

95:                                               ; preds = %93
  br i1 %94, label %96, label %111

96:                                               ; preds = %95
  %97 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !43
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %97, ptr noundef @__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree)
          to label %99 unwind label %42

99:                                               ; preds = %96
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef @.str.1)
          to label %101 unwind label %42

101:                                              ; preds = %99
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK9TokenTree(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull align 8 dereferenceable(136) %102)
          to label %104 unwind label %42

104:                                              ; preds = %101
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef @.str.2)
          to label %106 unwind label %42

106:                                              ; preds = %104
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @_ZSt3decRSt8ios_base)
          to label %108 unwind label %42

108:                                              ; preds = %106
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %110 unwind label %42

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110, %95
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  %115 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %116 unwind label %42

116:                                              ; preds = %114
  br i1 %115, label %117, label %132

117:                                              ; preds = %116
  %118 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !43
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %118, ptr noundef @__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree)
          to label %120 unwind label %42

120:                                              ; preds = %117
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef @.str.3)
          to label %122 unwind label %42

122:                                              ; preds = %120
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %123)
          to label %125 unwind label %42

125:                                              ; preds = %122
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull align 4 dereferenceable(4) %124)
          to label %127 unwind label %42

127:                                              ; preds = %125
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef @_ZSt3decRSt8ios_base)
          to label %129 unwind label %42

129:                                              ; preds = %127
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %131 unwind label %42

131:                                              ; preds = %129
  br label %132

132:                                              ; preds = %131, %116
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %135)
          to label %137 unwind label %42

137:                                              ; preds = %134
  %138 = load i32, ptr %136, align 4, !tbaa !46
  %139 = getelementptr inbounds %class.TTStream, ptr %16, i32 0, i32 3
  store i32 %138, ptr %139, align 8, !tbaa !14
  %140 = getelementptr inbounds %class.TTStream, ptr %16, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %141, ptr %15, align 8, !tbaa !5
  %142 = invoke { i32, ptr } @_ZSt9make_pairIiPK9TokenTreeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %143 unwind label %150

143:                                              ; preds = %137
  %144 = getelementptr inbounds { i32, ptr }, ptr %13, i32 0, i32 0
  %145 = extractvalue { i32, ptr } %142, 0
  store i32 %145, ptr %144, align 8
  %146 = getelementptr inbounds { i32, ptr }, ptr %13, i32 0, i32 1
  %147 = extractvalue { i32, ptr } %142, 1
  store ptr %147, ptr %146, align 8
  invoke 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) %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %148 unwind label %150

148:                                              ; preds = %143
  invoke void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %140, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %149 unwind label %150

149:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  ret void

150:                                              ; preds = %148, %143, %137
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %9, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  br label %154

154:                                              ; preds = %150, %91, %42
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br label %155

155:                                              ; preds = %154, %38
  call void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @_ZN11TokenStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %16) #7
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr %9, align 8
  %158 = load i32, ptr %10, align 4
  %159 = insertvalue { ptr, i32 } poison, ptr %157, 0
  %160 = insertvalue { ptr, i32 } %159, i32 %158, 1
  resume { ptr, i32 } %160
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

declare void @_ZN11TokenStreamC2E10ParseState(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef byval(%struct.ParseState) align 8) unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

declare noundef zeroext i1 @_Z13debug_enabledv() #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4Span(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; 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 @_Z12debug_outputiPKc(i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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) #0 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #5

declare void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

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

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

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

; Function Attrs: nounwind
declare void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK9TokenTree(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(136)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136)) #3 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)) #0 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)) #0

; 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 #3 align 2

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

; Function Attrs: nounwind
declare void @_ZN11TokenStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #6

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 = !{i64 0, i64 1, !10, i64 1, i64 1, !10, i64 2, i64 1, !10, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !8, i64 0}
!14 = !{!15, !32, i64 208}
!15 = !{!"_ZTS8TTStream", !16, i64 0, !38, i64 176, !22, i64 200, !32, i64 208, !6, i64 216}
!16 = !{!"_ZTS11TokenStream", !11, i64 8, !17, i64 16, !25, i64 104, !32, i64 112, !33, i64 120, !37, i64 144}
!17 = !{!"_ZTS5Token", !18, i64 8, !19, i64 16, !21, i64 56, !25, 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, !24, i64 16, !24, i64 20}
!22 = !{!"_ZTS4Span", !6, i64 0}
!23 = !{!"_ZTS8RcString", !6, i64 0}
!24 = !{!"int", !7, i64 0}
!25 = !{!"_ZTSN5Ident7HygieneE", !26, i64 0}
!26 = !{!"_ZTSSt10unique_ptrIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !27, i64 0}
!27 = !{!"_ZTSSt15__uniq_ptr_dataIN5Ident7Hygiene5InnerESt14default_deleteIS2_ELb1ELb1EE", !28, i64 0}
!28 = !{!"_ZTSSt15__uniq_ptr_implIN5Ident7Hygiene5InnerESt14default_deleteIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt5tupleIJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !30, i64 0}
!30 = !{!"_ZTSSt11_Tuple_implILm0EJPN5Ident7Hygiene5InnerESt14default_deleteIS2_EEE", !31, i64 0}
!31 = !{!"_ZTSSt10_Head_baseILm0EPN5Ident7Hygiene5InnerELb0EE", !6, i64 0}
!32 = !{!"_ZTSN3AST7EditionE", !7, i64 0}
!33 = !{!"_ZTSSt6vectorIN11TokenStream12LookaheadEntESaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN11TokenStream12LookaheadEntESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!"_ZTS10ParseState", !11, i64 0, !11, i64 1, !11, i64 2, !6, i64 8, !6, i64 16, !6, i64 24}
!38 = !{!"_ZTSSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt4pairIjPK9TokenTreeESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!15, !6, i64 216}
!43 = !{!24, !24, i64 0}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}
!46 = !{!32, !32, i64 0}


; 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"

%struct.ParseState = type { i8, i8, i8, ptr, ptr, ptr }
%struct.Span = type { ptr }
%"struct.std::pair" = type { i32, ptr }
%"struct.std::pair.15" = type { i32, ptr }

@_ZTV8TTStream = external dso_local unnamed_addr constant { [11 x ptr] }, align 8
@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree = external hidden unnamed_addr constant [9 x i8], align 1
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8TTStreamC2E4Span10ParseStateRK9TokenTree(ptr noundef nonnull align 8 dereferenceable(224) %0, ptr noundef %1, ptr nocapture noundef readonly byval(%struct.ParseState) align 8 %2, ptr noundef nonnull align 8 dereferenceable(136) %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.Span, align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair.15", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  tail call void @_ZN11TokenStreamC2E10ParseState(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull byval(%struct.ParseState) align 8 %2)
  store ptr getelementptr inbounds inrange(-16, 72) (i8, ptr @_ZTV8TTStream, i64 16), ptr %0, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %11 = getelementptr inbounds i8, ptr %0, i64 200
  tail call void @_ZN4SpanC2EOS_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %12 = getelementptr inbounds i8, ptr %0, i64 208
  store i32 0, ptr %12, align 8, !tbaa !8
  %13 = getelementptr inbounds i8, ptr %0, i64 216
  store ptr null, ptr %13, align 8, !tbaa !39
  %14 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %15 unwind label %27

15:                                               ; preds = %4
  br i1 %14, label %16, label %29

16:                                               ; preds = %15
  %17 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !40
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %17, ptr noundef nonnull @__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree)
          to label %19 unwind label %27

19:                                               ; preds = %16
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str)
          to label %21 unwind label %27

21:                                               ; preds = %19
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4Span(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %23 unwind label %27

23:                                               ; preds = %21
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %25 unwind label %27

25:                                               ; preds = %23
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %29 unwind label %27

27:                                               ; preds = %85, %83, %80, %78, %75, %72, %70, %68, %66, %64, %62, %59, %31, %25, %23, %21, %19, %16, %4
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %98

29:                                               ; preds = %25, %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  invoke void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %.preheader unwind label %33

.preheader:                                       ; preds = %29, %53
  %30 = call noundef zeroext i1 @_ZNK4SpancvbEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %30, label %37, label %31

31:                                               ; preds = %.preheader
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %32 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %58 unwind label %27

33:                                               ; preds = %29
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %57

35:                                               ; preds = %53, %51, %49, %45, %43, %40, %37
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br label %57

37:                                               ; preds = %.preheader
  %38 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %39 unwind label %35

39:                                               ; preds = %37
  br i1 %38, label %40, label %53

40:                                               ; preds = %39
  %41 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !40
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %41, ptr noundef nonnull @__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree)
          to label %43 unwind label %35

43:                                               ; preds = %40
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull @.str)
          to label %45 unwind label %35

45:                                               ; preds = %43
  %46 = call noundef ptr @_ZNK4SpanptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4Span(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %49 unwind label %35

49:                                               ; preds = %45
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %51 unwind label %35

51:                                               ; preds = %49
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %53 unwind label %35

53:                                               ; preds = %39, %51
  %54 = call noundef ptr @_ZNK4SpanptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %55)
          to label %.preheader unwind label %35, !llvm.loop !41

57:                                               ; preds = %35, %33
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %98

58:                                               ; preds = %31
  br i1 %32, label %59, label %72

59:                                               ; preds = %58
  %60 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !40
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %60, ptr noundef nonnull @__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree)
          to label %62 unwind label %27

62:                                               ; preds = %59
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.1)
          to label %64 unwind label %27

64:                                               ; preds = %62
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK9TokenTree(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 8 dereferenceable(136) %3)
          to label %66 unwind label %27

66:                                               ; preds = %64
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @.str.2)
          to label %68 unwind label %27

68:                                               ; preds = %66
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %70 unwind label %27

70:                                               ; preds = %68
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %72 unwind label %27

72:                                               ; preds = %58, %70
  %73 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %74 unwind label %27

74:                                               ; preds = %72
  br i1 %73, label %75, label %87

75:                                               ; preds = %74
  %76 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !40
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %76, ptr noundef nonnull @__FUNCTION__._ZN8TTStreamC2E4Span10ParseStateRK9TokenTree)
          to label %78 unwind label %27

78:                                               ; preds = %75
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @.str.3)
          to label %80 unwind label %27

80:                                               ; preds = %78
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %3)
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ASTlsERSoRKNS_7EditionE(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef nonnull align 4 dereferenceable(4) %81)
          to label %83 unwind label %27

83:                                               ; preds = %80
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %85 unwind label %27

85:                                               ; preds = %83
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %87 unwind label %27

87:                                               ; preds = %85, %74
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9TokenTree11get_editionEv(ptr noundef nonnull align 8 dereferenceable(136) %3)
  %89 = load i32, ptr %88, align 4, !tbaa !43
  store i32 %89, ptr %12, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 0, ptr %8, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store ptr %3, ptr %9, align 8, !tbaa !44
  %90 = invoke { i32, ptr } @_ZSt9make_pairIiPK9TokenTreeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %91 unwind label %96

91:                                               ; preds = %87
  %92 = extractvalue { i32, ptr } %90, 0
  store i32 %92, ptr %7, align 8
  %93 = getelementptr inbounds i8, ptr %7, i64 8
  %94 = extractvalue { i32, ptr } %90, 1
  store ptr %94, ptr %93, 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) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  invoke void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %95 unwind label %96

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  ret void

96:                                               ; preds = %91, %87
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %98

98:                                               ; preds = %96, %57, %27
  %.pn.pn = phi { ptr, i32 } [ %.pn, %57 ], [ %97, %96 ], [ %28, %27 ]
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @_ZNSt6vectorISt4pairIjPK9TokenTreeESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @_ZN11TokenStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %0) #6
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN11TokenStreamC2E10ParseState(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef byval(%struct.ParseState) align 8) unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4Span(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

; 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 #0 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)) #3

; 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 #0 align 2

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

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

declare void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

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

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

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

; Function Attrs: nounwind
declare void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK9TokenTree(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #1

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

; 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 #2 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 #0 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 #0

; 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 #2 align 2

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

; Function Attrs: nounwind
declare void @_ZN11TokenStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #5

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

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

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass