; LLVM IR from thepowersgang/mrustc :: src/parse/expr.ll (Z12Parse_Expr11R11TokenStream)

; 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.AST::ExprNodeP" = type { ptr }
%class.TypeRef = type { %struct.Span, %class.TypeData }
%class.TypeData = type { i32, %"union.TypeData::DataUnion" }
%"union.TypeData::DataUnion" = type { %"struct.TypeData::Data_ErasedType", [32 x i8] }
%"struct.TypeData::Data_ErasedType" = type { %"class.std::vector.146", %"class.std::vector.146", %"class.std::vector.151" }
%"class.std::vector.146" = type { %"struct.std::_Vector_base.147" }
%"struct.std::_Vector_base.147" = type { %"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl" }
%"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl" = type { %"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.151" = type { %"struct.std::_Vector_base.152" }
%"struct.std::_Vector_base.152" = type { %"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN5TokenC1Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2

declare void @_ZN11TokenStream8getTokenEv(ptr dead_on_unwind writable sret(%class.Token) align 8, ptr noundef nonnull align 8 dereferenceable(176)) #2

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

declare void @_ZN11TokenStream7putbackE5Token(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL12mk_exprnodepRK11TokenStreamPN3AST8ExprNodeE(ptr dead_on_unwind noalias writable sret(%"class.AST::ExprNodeP") align 8, ptr noundef nonnull align 8 dereferenceable(176), ptr noundef) #7

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

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

declare void @_Z10Parse_TypeR11TokenStreamb(ptr dead_on_unwind writable sret(%class.TypeRef) align 8, ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12Parse_Expr11R11TokenStream(ptr dead_on_unwind noalias writable sret(%"class.AST::ExprNodeP") align 8 %0, ptr noundef nonnull align 8 dereferenceable(176) %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i1, align 1
  %7 = alloca %class.Token, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.Token, align 8
  %11 = alloca %"class.AST::ExprNodeP", align 8
  %12 = alloca %"class.AST::ExprNodeP", align 8
  %13 = alloca %class.TypeRef, align 8
  %14 = alloca i1, align 1
  %15 = alloca %class.Token, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store ptr @_Z12Parse_Expr12R11TokenStream, ptr %5, align 8, !tbaa !5
  store i1 false, ptr %6, align 1
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  call void %17(ptr dead_on_unwind writable sret(%"class.AST::ExprNodeP") align 8 %0, ptr noundef nonnull align 8 dereferenceable(176) %18)
  br label %19

19:                                               ; preds = %94, %2
  br label %20

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 88, ptr %7) #8
  invoke void @_ZN5TokenC1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7)
          to label %21 unwind label %28

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 88, ptr %10) #8
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN11TokenStream8getTokenEv(ptr dead_on_unwind writable sret(%class.Token) align 8 %10, ptr noundef nonnull align 8 dereferenceable(176) %22)
          to label %23 unwind label %32

23:                                               ; preds = %21
  %24 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZN5TokenaSEOS_(ptr noundef nonnull align 8 dereferenceable(88) %7, ptr noundef nonnull align 8 dereferenceable(88) %10)
          to label %25 unwind label %36

25:                                               ; preds = %23
  %26 = invoke noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88) %24)
          to label %27 unwind label %36

27:                                               ; preds = %25
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %10) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %10) #8
  switch i32 %26, label %79 [
    i32 93, label %41
  ]

28:                                               ; preds = %20
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %8, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %9, align 4
  br label %96

32:                                               ; preds = %21
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %8, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %9, align 4
  br label %40

36:                                               ; preds = %25, %23
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %10) #8
  br label %40

40:                                               ; preds = %36, %32
  call void @llvm.lifetime.end.p0(i64 88, ptr %10) #8
  br label %95

41:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 168) #9
          to label %44 unwind label %52

44:                                               ; preds = %41
  store i1 true, ptr %14, align 1
  invoke void @_ZN3AST9ExprNodePC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %45 unwind label %56

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 120, ptr %13) #8
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_Z10Parse_TypeR11TokenStreamb(ptr dead_on_unwind writable sret(%class.TypeRef) align 8 %13, ptr noundef nonnull align 8 dereferenceable(176) %46, i1 noundef zeroext false)
          to label %47 unwind label %60

47:                                               ; preds = %45
  invoke void @_ZN3AST13ExprNode_CastC2ENS_9ExprNodePEO7TypeRef(ptr noundef nonnull align 8 dereferenceable(168) %43, ptr noundef %12, ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %48 unwind label %64

48:                                               ; preds = %47
  store i1 false, ptr %14, align 1
  invoke void @_ZL12mk_exprnodepRK11TokenStreamPN3AST8ExprNodeE(ptr dead_on_unwind writable sret(%"class.AST::ExprNodeP") align 8 %11, ptr noundef nonnull align 8 dereferenceable(176) %42, ptr noundef %43)
          to label %49 unwind label %64

49:                                               ; preds = %48
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3AST9ExprNodePaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %51 unwind label %68

51:                                               ; preds = %49
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @_ZN7TypeRefD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr %13) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %91

52:                                               ; preds = %41
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %8, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %9, align 4
  br label %78

56:                                               ; preds = %44
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %9, align 4
  br label %74

60:                                               ; preds = %45
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %8, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %9, align 4
  br label %73

64:                                               ; preds = %48, %47
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %8, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %9, align 4
  br label %72

68:                                               ; preds = %49
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %8, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %9, align 4
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br label %72

72:                                               ; preds = %68, %64
  call void @_ZN7TypeRefD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #8
  br label %73

73:                                               ; preds = %72, %60
  call void @llvm.lifetime.end.p0(i64 120, ptr %13) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br label %74

74:                                               ; preds = %73, %56
  %75 = load i1, ptr %14, align 1
  br i1 %75, label %76, label %77

76:                                               ; preds = %74
  call void @_ZdlPvm(ptr noundef %43, i64 noundef 168) #10
  br label %77

77:                                               ; preds = %76, %74
  br label %78

78:                                               ; preds = %77, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %95

79:                                               ; preds = %27
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN5TokenC2EOS_(ptr noundef nonnull align 8 dereferenceable(88) %15, ptr noundef nonnull align 8 dereferenceable(88) %7)
          to label %81 unwind label %83

81:                                               ; preds = %79
  invoke void @_ZN11TokenStream7putbackE5Token(ptr noundef nonnull align 8 dereferenceable(176) %80, ptr noundef %15)
          to label %82 unwind label %87

82:                                               ; preds = %81
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %15) #8
  store i1 true, ptr %6, align 1
  store i32 1, ptr %16, align 4
  br label %92

83:                                               ; preds = %79
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %8, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %9, align 4
  br label %95

87:                                               ; preds = %81
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %8, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %9, align 4
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %15) #8
  br label %95

91:                                               ; preds = %51
  store i32 0, ptr %16, align 4
  br label %92

92:                                               ; preds = %91, %82
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %7) #8
  %93 = load i32, ptr %16, align 4
  switch i32 %93, label %97 [
    i32 0, label %94
  ]

94:                                               ; preds = %92
  br label %19, !llvm.loop !9

95:                                               ; preds = %87, %83, %78, %40
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #8
  br label %96

96:                                               ; preds = %95, %28
  call void @llvm.lifetime.end.p0(i64 88, ptr %7) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %101

97:                                               ; preds = %92
  %98 = load i1, ptr %6, align 1
  br i1 %98, label %100, label %99

99:                                               ; preds = %97
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #8
  br label %100

100:                                              ; preds = %99, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void

101:                                              ; preds = %96
  %102 = load ptr, ptr %8, align 8
  %103 = load i32, ptr %9, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12Parse_Expr12R11TokenStream(ptr dead_on_unwind noalias writable sret(%"class.AST::ExprNodeP") align 8, ptr noundef nonnull align 8 dereferenceable(176)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST13ExprNode_CastC2ENS_9ExprNodePEO7TypeRef(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef, ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 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 = { nocallback nofree nosync 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 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(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 = { nobuiltin 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 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = distinct !{!9, !10}
!10 = !{!"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.AST::ExprNodeP" = type { ptr }
%class.TypeRef = type { %struct.Span, %class.TypeData }
%class.TypeData = type { i32, %"union.TypeData::DataUnion" }
%"union.TypeData::DataUnion" = type { %"struct.TypeData::Data_ErasedType", [32 x i8] }
%"struct.TypeData::Data_ErasedType" = type { %"class.std::vector.146", %"class.std::vector.146", %"class.std::vector.151" }
%"class.std::vector.146" = type { %"struct.std::_Vector_base.147" }
%"struct.std::_Vector_base.147" = type { %"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl" }
%"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl" = type { %"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.151" = type { %"struct.std::_Vector_base.152" }
%"struct.std::_Vector_base.152" = type { %"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN5TokenC1Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2

declare void @_ZN11TokenStream8getTokenEv(ptr dead_on_unwind writable sret(%class.Token) align 8, ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #2

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

declare void @_ZN11TokenStream7putbackE5Token(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL12mk_exprnodepRK11TokenStreamPN3AST8ExprNodeE(ptr dead_on_unwind noalias writable sret(%"class.AST::ExprNodeP") align 8, ptr noundef nonnull align 8 dereferenceable(176), ptr noundef) local_unnamed_addr #7

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

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

declare void @_Z10Parse_TypeR11TokenStreamb(ptr dead_on_unwind writable sret(%class.TypeRef) align 8, ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12Parse_Expr11R11TokenStream(ptr dead_on_unwind noalias writable sret(%"class.AST::ExprNodeP") align 8 %0, ptr noundef nonnull align 8 dereferenceable(176) %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.Token, align 8
  %4 = alloca %class.Token, align 8
  %5 = alloca %"class.AST::ExprNodeP", align 8
  %6 = alloca %"class.AST::ExprNodeP", align 8
  %7 = alloca %class.TypeRef, align 8
  %8 = alloca %class.Token, align 8
  tail call void @_Z12Parse_Expr12R11TokenStream(ptr dead_on_unwind writable sret(%"class.AST::ExprNodeP") align 8 %0, ptr noundef nonnull align 8 dereferenceable(176) %1)
  br label %9

9:                                                ; preds = %40, %2
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %3) #8
  invoke void @_ZN5TokenC1Ev(ptr noundef nonnull align 8 dereferenceable(88) %3)
          to label %10 unwind label %15

10:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %4) #8
  invoke void @_ZN11TokenStream8getTokenEv(ptr dead_on_unwind nonnull writable sret(%class.Token) align 8 %4, ptr noundef nonnull align 8 dereferenceable(176) %1)
          to label %11 unwind label %17

11:                                               ; preds = %10
  %12 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZN5TokenaSEOS_(ptr noundef nonnull align 8 dereferenceable(88) %3, ptr noundef nonnull align 8 dereferenceable(88) %4)
          to label %13 unwind label %19

13:                                               ; preds = %11
  %14 = call noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88) %12)
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %4) #8
  %cond = icmp eq i32 %14, 93
  br i1 %cond, label %22, label %34

15:                                               ; preds = %9
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %43

17:                                               ; preds = %10
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %21

19:                                               ; preds = %11
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #8
  br label %21

21:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %4) #8
  br label %42

22:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %23 = invoke noalias noundef nonnull dereferenceable(168) ptr @_Znwm(i64 noundef 168) #9
          to label %24 unwind label %27

24:                                               ; preds = %22
  call void @_ZN3AST9ExprNodePC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %0)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %7) #8
  invoke void @_Z10Parse_TypeR11TokenStreamb(ptr dead_on_unwind nonnull writable sret(%class.TypeRef) align 8 %7, ptr noundef nonnull align 8 dereferenceable(176) %1, i1 noundef zeroext false)
          to label %25 unwind label %.thread

25:                                               ; preds = %24
  invoke void @_ZN3AST13ExprNode_CastC2ENS_9ExprNodePEO7TypeRef(ptr noundef nonnull align 8 dereferenceable(168) %23, ptr noundef nonnull %6, ptr noundef nonnull align 8 dereferenceable(120) %7)
          to label %26 unwind label %30

26:                                               ; preds = %25
  invoke void @_ZL12mk_exprnodepRK11TokenStreamPN3AST8ExprNodeE(ptr dead_on_unwind nonnull writable sret(%"class.AST::ExprNodeP") align 8 %5, ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef nonnull %23)
          to label %40 unwind label %30

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

.thread:                                          ; preds = %24
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br label %32

30:                                               ; preds = %25, %26
  %.011 = phi i1 [ false, %26 ], [ true, %25 ]
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7TypeRefD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %7) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %.011, label %32, label %33

32:                                               ; preds = %.thread, %30
  %.pn2229 = phi { ptr, i32 } [ %29, %.thread ], [ %31, %30 ]
  call void @_ZdlPvm(ptr noundef nonnull %23, i64 noundef 168) #10
  br label %33

33:                                               ; preds = %30, %32, %27
  %.pn22.pn = phi { ptr, i32 } [ %.pn2229, %32 ], [ %31, %30 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %42

34:                                               ; preds = %13
  invoke void @_ZN5TokenC2EOS_(ptr noundef nonnull align 8 dereferenceable(88) %8, ptr noundef nonnull align 8 dereferenceable(88) %3)
          to label %35 unwind label %36

35:                                               ; preds = %34
  invoke void @_ZN11TokenStream7putbackE5Token(ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef nonnull %8)
          to label %44 unwind label %38

36:                                               ; preds = %34
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %42

38:                                               ; preds = %35
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %8) #8
  br label %42

40:                                               ; preds = %26
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3AST9ExprNodePaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @_ZN7TypeRefD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %7) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #8
  br label %9, !llvm.loop !5

42:                                               ; preds = %38, %36, %33, %21
  %.pn22.pn.pn = phi { ptr, i32 } [ %.pn22.pn, %33 ], [ %39, %38 ], [ %37, %36 ], [ %.pn, %21 ]
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  br label %43

43:                                               ; preds = %42, %15
  %.pn22.pn.pn.pn = phi { ptr, i32 } [ %.pn22.pn.pn, %42 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #8
  resume { ptr, i32 } %.pn22.pn.pn.pn

44:                                               ; preds = %35
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %8) #8
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #8
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12Parse_Expr12R11TokenStream(ptr dead_on_unwind noalias writable sret(%"class.AST::ExprNodeP") align 8, ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST13ExprNode_CastC2ENS_9ExprNodePEO7TypeRef(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef, ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 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 = { mustprogress nocallback nofree nosync 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 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(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 = { nobuiltin 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 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass