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

; 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.std::pair.22" = type { i32, ptr }
%"struct.std::pair.24" = type { i32, ptr }
%class.TTStreamO = type { %class.TokenStream, %struct.Span, %class.Position, %class.TokenTree, %"class.std::vector.17", 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.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 }
%struct.Span = type { ptr }
%class.Position = type { %struct.Span, %class.RcString, i32, i32 }
%class.RcString = type { ptr }
%class.TokenTree = type { ptr, i32, %"class.Ident::Hygiene", %class.Token, %"class.std::vector.10" }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<TokenTree, std::allocator<TokenTree>>::_Vector_impl" }
%"struct.std::_Vector_base<TokenTree, std::allocator<TokenTree>>::_Vector_impl" = type { %"struct.std::_Vector_base<TokenTree, std::allocator<TokenTree>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TokenTree, std::allocator<TokenTree>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<std::pair<unsigned int, TokenTree *>, std::allocator<std::pair<unsigned int, TokenTree *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, TokenTree *>, std::allocator<std::pair<unsigned int, TokenTree *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, TokenTree *>, std::allocator<std::pair<unsigned int, TokenTree *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, TokenTree *>, std::allocator<std::pair<unsigned int, TokenTree *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [77 x i8], align 1
@_ZTV9TTStreamO = external dso_local unnamed_addr constant { [11 x ptr] }, align 8
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN9TTStreamOC2E4Span10ParseState9TokenTree = external hidden unnamed_addr constant [50 x i8], align 1

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

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 @_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(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9TTStreamOC2E4Span10ParseState9TokenTree(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef %1, ptr noundef byval(%struct.ParseState) align 8 %2, ptr noundef %3) unnamed_addr #6 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.std::pair.22", align 8
  %12 = alloca %"struct.std::pair.24", align 8
  %13 = alloca i32, align 4
  %14 = 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
  %15 = 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) %15, ptr noundef byval(%struct.ParseState) align 8 %8)
  store ptr getelementptr inbounds inrange(-16, 72) ({ [11 x ptr] }, ptr @_ZTV9TTStreamO, i32 0, i32 0, i32 2), ptr %15, align 8, !tbaa !12
  %16 = getelementptr inbounds %class.TTStreamO, ptr %15, i32 0, i32 1
  invoke void @_ZN4SpanC2EOS_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %17 unwind label %30

17:                                               ; preds = %4
  %18 = getelementptr inbounds %class.TTStreamO, ptr %15, i32 0, i32 2
  invoke void @_ZN8PositionC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %19 unwind label %34

19:                                               ; preds = %17
  %20 = getelementptr inbounds %class.TTStreamO, ptr %15, i32 0, i32 3
  invoke void @_ZN9TokenTreeC2EOS_(ptr noundef nonnull align 8 dereferenceable(136) %20, ptr noundef nonnull align 8 dereferenceable(136) %3)
          to label %21 unwind label %38

21:                                               ; preds = %19
  %22 = getelementptr inbounds %class.TTStreamO, ptr %15, i32 0, i32 4
  call void @_ZNSt6vectorISt4pairIjP9TokenTreeESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  %23 = getelementptr inbounds %class.TTStreamO, ptr %15, i32 0, i32 5
  store i32 0, ptr %23, align 8, !tbaa !14
  %24 = getelementptr inbounds %class.TTStreamO, ptr %15, i32 0, i32 6
  store ptr null, ptr %24, align 8, !tbaa !47
  %25 = getelementptr inbounds %class.TTStreamO, ptr %15, i32 0, i32 1
  %26 = invoke noundef zeroext i1 @_ZNK4SpancvbEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %27 unwind label %42

27:                                               ; preds = %21
  br i1 %26, label %28, label %29

28:                                               ; preds = %27
  br label %47

29:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.5, i32 noundef 92, ptr noundef @__PRETTY_FUNCTION__._ZN9TTStreamOC2E4Span10ParseState9TokenTree) #9
  unreachable

30:                                               ; preds = %4
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %9, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %10, align 4
  br label %59

34:                                               ; preds = %17
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %9, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %10, align 4
  br label %58

38:                                               ; preds = %19
  %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 %57

42:                                               ; preds = %21
  %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 %56

46:                                               ; No predecessors!
  br label %47

47:                                               ; preds = %46, %28
  %48 = getelementptr inbounds %class.TTStreamO, ptr %15, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr null, ptr %14, align 8, !tbaa !49
  invoke void @_ZSt9make_pairIiDnESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr dead_on_unwind writable sret(%"struct.std::pair.24") align 8 %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %49 unwind label %52

49:                                               ; preds = %47
  invoke void @_ZNSt4pairIjP9TokenTreeEC2IiDnTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS5_S6_EEclsr6_PCCFPIS5_S6_EE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS_IS5_S6_E(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %50 unwind label %52

50:                                               ; preds = %49
  invoke void @_ZNSt6vectorISt4pairIjP9TokenTreeESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %51 unwind label %52

51:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  ret void

52:                                               ; preds = %50, %49, %47
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %9, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %56

56:                                               ; preds = %52, %42
  call void @_ZNSt6vectorISt4pairIjP9TokenTreeESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  call void @_ZN9TokenTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %20) #8
  br label %57

57:                                               ; preds = %56, %38
  call void @_ZN8PositionD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  br label %58

58:                                               ; preds = %57, %34
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  br label %59

59:                                               ; preds = %58, %30
  call void @_ZN11TokenStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %15) #8
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %9, align 8
  %62 = load i32, ptr %10, align 4
  %63 = insertvalue { ptr, i32 } poison, ptr %61, 0
  %64 = insertvalue { ptr, i32 } %63, i32 %62, 1
  resume { ptr, i32 } %64
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIiDnESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.24") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIjP9TokenTreeEC2IiDnTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS5_S6_EEclsr6_PCCFPIS5_S6_EE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS_IS5_S6_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 @_ZNSt6vectorISt4pairIjP9TokenTreeESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{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 368}
!15 = !{!"_ZTS9TTStreamO", !16, i64 0, !22, i64 176, !21, i64 184, !38, i64 208, !43, i64 344, !32, i64 368, !6, i64 376}
!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 = !{!"_ZTS9TokenTree", !32, i64 8, !25, i64 16, !17, i64 24, !39, i64 112}
!39 = !{!"_ZTSSt6vectorI9TokenTreeSaIS0_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseI9TokenTreeSaIS0_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseI9TokenTreeSaIS0_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseI9TokenTreeSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTSSt6vectorISt4pairIjP9TokenTreeESaIS3_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseISt4pairIjP9TokenTreeESaIS3_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseISt4pairIjP9TokenTreeESaIS3_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseISt4pairIjP9TokenTreeESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{!15, !6, i64 376}
!48 = !{!24, !24, i64 0}
!49 = !{!50, !50, i64 0}
!50 = !{!"std::nullptr_t", !7, 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.std::pair.22" = type { i32, ptr }
%"struct.std::pair.24" = type { i32, ptr }

@.str.5 = external hidden unnamed_addr constant [77 x i8], align 1
@_ZTV9TTStreamO = external dso_local unnamed_addr constant { [11 x ptr] }, align 8
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN9TTStreamOC2E4Span10ParseState9TokenTree = external hidden unnamed_addr constant [50 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9TTStreamOC2E4Span10ParseState9TokenTree(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef %1, ptr nocapture noundef readonly byval(%struct.ParseState) align 8 %2, ptr noundef %3) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.std::pair.22", align 8
  %6 = alloca %"struct.std::pair.24", align 8
  %7 = alloca i32, align 4
  %8 = 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 @_ZTV9TTStreamO, i64 16), ptr %0, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZN4SpanC2EOS_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %10 = getelementptr inbounds i8, ptr %0, i64 184
  invoke void @_ZN8PositionC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %11 unwind label %19

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 208
  invoke void @_ZN9TokenTreeC2EOS_(ptr noundef nonnull align 8 dereferenceable(136) %12, ptr noundef nonnull align 8 dereferenceable(136) %3)
          to label %13 unwind label %21

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 344
  tail call void @_ZNSt6vectorISt4pairIjP9TokenTreeESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %15 = getelementptr inbounds i8, ptr %0, i64 368
  store i32 0, ptr %15, align 8, !tbaa !8
  %16 = getelementptr inbounds i8, ptr %0, i64 376
  store ptr null, ptr %16, align 8, !tbaa !44
  %17 = tail call noundef zeroext i1 @_ZNK4SpancvbEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  br i1 %17, label %23, label %18

18:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.5, i32 noundef 92, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN9TTStreamOC2E4Span10ParseState9TokenTree) #8
  unreachable

19:                                               ; preds = %4
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %29

21:                                               ; preds = %11
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %28

23:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 0, ptr %7, align 4, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store ptr null, ptr %8, align 8, !tbaa !46
  invoke void @_ZSt9make_pairIiDnESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.24") align 8 %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %24 unwind label %26

24:                                               ; preds = %23
  call void @_ZNSt4pairIjP9TokenTreeEC2IiDnTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS5_S6_EEclsr6_PCCFPIS5_S6_EE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS_IS5_S6_E(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
  invoke void @_ZNSt6vectorISt4pairIjP9TokenTreeESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %25 unwind label %26

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

26:                                               ; preds = %24, %23
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @_ZNSt6vectorISt4pairIjP9TokenTreeESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @_ZN9TokenTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %12) #7
  br label %28

28:                                               ; preds = %26, %21
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %22, %21 ]
  call void @_ZN8PositionD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %29

29:                                               ; preds = %28, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %28 ], [ %20, %19 ]
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @_ZN11TokenStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %0) #7
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIiDnESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.24") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !29, i64 368}
!9 = !{!"_ZTS9TTStreamO", !10, i64 0, !18, i64 176, !17, i64 184, !35, i64 208, !40, i64 344, !29, i64 368, !19, i64 376}
!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 = !{!"_ZTS9TokenTree", !29, i64 8, !22, i64 16, !13, i64 24, !36, i64 112}
!36 = !{!"_ZTSSt6vectorI9TokenTreeSaIS0_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseI9TokenTreeSaIS0_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseI9TokenTreeSaIS0_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseI9TokenTreeSaIS0_EE17_Vector_impl_dataE", !19, i64 0, !19, i64 8, !19, i64 16}
!40 = !{!"_ZTSSt6vectorISt4pairIjP9TokenTreeESaIS3_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseISt4pairIjP9TokenTreeESaIS3_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseISt4pairIjP9TokenTreeESaIS3_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseISt4pairIjP9TokenTreeESaIS3_EE17_Vector_impl_dataE", !19, i64 0, !19, i64 8, !19, i64 16}
!44 = !{!9, !19, i64 376}
!45 = !{!21, !21, i64 0}
!46 = !{!47, !47, i64 0}
!47 = !{!"std::nullptr_t", !12, i64 0}


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