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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11Parse_Expr3R11TokenStream(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.AST::ExprNodeP", align 8
  %14 = alloca i1, align 1
  %15 = alloca %"class.AST::ExprNodeP", align 8
  %16 = alloca %"class.AST::ExprNodeP", align 8
  %17 = alloca %"class.AST::ExprNodeP", align 8
  %18 = alloca i1, align 1
  %19 = alloca %class.Token, align 8
  %20 = 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 @_Z11Parse_Expr4R11TokenStream, ptr %5, align 8, !tbaa !5
  store i1 false, ptr %6, align 1
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  call void %21(ptr dead_on_unwind writable sret(%"class.AST::ExprNodeP") align 8 %0, ptr noundef nonnull align 8 dereferenceable(176) %22)
  br label %23

23:                                               ; preds = %138, %2
  br label %24

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 88, ptr %7) #8
  invoke void @_ZN5TokenC1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7)
          to label %25 unwind label %32

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 88, ptr %10) #8
  %26 = 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) %26)
          to label %27 unwind label %36

27:                                               ; preds = %25
  %28 = 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 %29 unwind label %40

29:                                               ; preds = %27
  %30 = invoke noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88) %28)
          to label %31 unwind label %40

31:                                               ; preds = %29
  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 %30, label %123 [
    i32 58, label %45
    i32 59, label %84
  ]

32:                                               ; preds = %24
  %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 %140

36:                                               ; preds = %25
  %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
  br label %44

40:                                               ; preds = %29, %27
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %8, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %9, align 4
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %10) #8
  br label %44

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

45:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #9
          to label %48 unwind label %57

48:                                               ; preds = %45
  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 %49 unwind label %61

49:                                               ; preds = %48
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void %50(ptr dead_on_unwind writable sret(%"class.AST::ExprNodeP") align 8 %13, ptr noundef nonnull align 8 dereferenceable(176) %51)
          to label %52 unwind label %65

52:                                               ; preds = %49
  invoke void @_ZN3AST14ExprNode_BinOpC2ENS0_4TypeENS_9ExprNodePES2_(ptr noundef nonnull align 8 dereferenceable(64) %47, i32 noundef 0, ptr noundef %12, ptr noundef %13)
          to label %53 unwind label %69

53:                                               ; preds = %52
  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) %46, ptr noundef %47)
          to label %54 unwind label %69

54:                                               ; preds = %53
  %55 = 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 %56 unwind label %73

56:                                               ; preds = %54
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %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 %135

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

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

65:                                               ; preds = %49
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  br label %78

69:                                               ; preds = %53, %52
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  br label %77

73:                                               ; preds = %54
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %8, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %9, align 4
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br label %77

77:                                               ; preds = %73, %69
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  br label %78

78:                                               ; preds = %77, %65
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br label %79

79:                                               ; preds = %78, %61
  %80 = load i1, ptr %14, align 1
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  call void @_ZdlPvm(ptr noundef %47, i64 noundef 64) #10
  br label %82

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

83:                                               ; preds = %82, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %139

84:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #9
          to label %87 unwind label %96

87:                                               ; preds = %84
  store i1 true, ptr %18, align 1
  invoke void @_ZN3AST9ExprNodePC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %88 unwind label %100

88:                                               ; preds = %87
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void %89(ptr dead_on_unwind writable sret(%"class.AST::ExprNodeP") align 8 %17, ptr noundef nonnull align 8 dereferenceable(176) %90)
          to label %91 unwind label %104

91:                                               ; preds = %88
  invoke void @_ZN3AST14ExprNode_BinOpC2ENS0_4TypeENS_9ExprNodePES2_(ptr noundef nonnull align 8 dereferenceable(64) %86, i32 noundef 1, ptr noundef %16, ptr noundef %17)
          to label %92 unwind label %108

92:                                               ; preds = %91
  store i1 false, ptr %18, align 1
  invoke void @_ZL12mk_exprnodepRK11TokenStreamPN3AST8ExprNodeE(ptr dead_on_unwind writable sret(%"class.AST::ExprNodeP") align 8 %15, ptr noundef nonnull align 8 dereferenceable(176) %85, ptr noundef %86)
          to label %93 unwind label %108

93:                                               ; preds = %92
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3AST9ExprNodePaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %95 unwind label %112

95:                                               ; preds = %93
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %135

96:                                               ; preds = %84
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %8, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %9, align 4
  br label %122

100:                                              ; preds = %87
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %8, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %9, align 4
  br label %118

104:                                              ; preds = %88
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %8, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %9, align 4
  br label %117

108:                                              ; preds = %92, %91
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %8, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %9, align 4
  br label %116

112:                                              ; preds = %93
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %8, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %9, align 4
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br label %116

116:                                              ; preds = %112, %108
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br label %117

117:                                              ; preds = %116, %104
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  br label %118

118:                                              ; preds = %117, %100
  %119 = load i1, ptr %18, align 1
  br i1 %119, label %120, label %121

120:                                              ; preds = %118
  call void @_ZdlPvm(ptr noundef %86, i64 noundef 64) #10
  br label %121

121:                                              ; preds = %120, %118
  br label %122

122:                                              ; preds = %121, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %139

123:                                              ; preds = %31
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN5TokenC2EOS_(ptr noundef nonnull align 8 dereferenceable(88) %19, ptr noundef nonnull align 8 dereferenceable(88) %7)
          to label %125 unwind label %127

125:                                              ; preds = %123
  invoke void @_ZN11TokenStream7putbackE5Token(ptr noundef nonnull align 8 dereferenceable(176) %124, ptr noundef %19)
          to label %126 unwind label %131

126:                                              ; preds = %125
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %19) #8
  store i1 true, ptr %6, align 1
  store i32 1, ptr %20, align 4
  br label %136

127:                                              ; preds = %123
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %8, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %9, align 4
  br label %139

131:                                              ; preds = %125
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %8, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %9, align 4
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %19) #8
  br label %139

135:                                              ; preds = %95, %56
  store i32 0, ptr %20, align 4
  br label %136

136:                                              ; preds = %135, %126
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %7) #8
  %137 = load i32, ptr %20, align 4
  switch i32 %137, label %141 [
    i32 0, label %138
  ]

138:                                              ; preds = %136
  br label %23, !llvm.loop !9

139:                                              ; preds = %131, %127, %122, %83, %44
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #8
  br label %140

140:                                              ; preds = %139, %32
  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 %145

141:                                              ; preds = %136
  %142 = load i1, ptr %6, align 1
  br i1 %142, label %144, label %143

143:                                              ; preds = %141
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #8
  br label %144

144:                                              ; preds = %143, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void

145:                                              ; preds = %140
  %146 = load ptr, ptr %8, align 8
  %147 = load i32, ptr %9, align 4
  %148 = insertvalue { ptr, i32 } poison, ptr %146, 0
  %149 = insertvalue { ptr, i32 } %148, i32 %147, 1
  resume { ptr, i32 } %149
}

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

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

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 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11Parse_Expr3R11TokenStream(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.AST::ExprNodeP", align 8
  %8 = alloca %"class.AST::ExprNodeP", align 8
  %9 = alloca %"class.AST::ExprNodeP", align 8
  %10 = alloca %"class.AST::ExprNodeP", align 8
  %11 = alloca %class.Token, align 8
  tail call void @_Z11Parse_Expr4R11TokenStream(ptr dead_on_unwind writable sret(%"class.AST::ExprNodeP") align 8 %0, ptr noundef nonnull align 8 dereferenceable(176) %1)
  br label %12

12:                                               ; preds = %59, %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 %13 unwind label %18

13:                                               ; preds = %12
  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 %14 unwind label %20

14:                                               ; preds = %13
  %15 = 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 %16 unwind label %22

16:                                               ; preds = %14
  %17 = call noundef i32 @_ZNK5Token4typeEv(ptr noundef nonnull align 8 dereferenceable(88) %15)
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %4) #8
  switch i32 %17, label %53 [
    i32 58, label %25
    i32 59, label %39
  ]

18:                                               ; preds = %12
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %61

20:                                               ; preds = %13
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %24

22:                                               ; preds = %14
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #8
  br label %24

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

25:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %26 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #9
          to label %27 unwind label %32

27:                                               ; preds = %25
  call void @_ZN3AST9ExprNodePC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %0)
  invoke void @_Z11Parse_Expr4R11TokenStream(ptr dead_on_unwind nonnull writable sret(%"class.AST::ExprNodeP") align 8 %7, ptr noundef nonnull align 8 dereferenceable(176) %1)
          to label %28 unwind label %.thread

28:                                               ; preds = %27
  invoke void @_ZN3AST14ExprNode_BinOpC2ENS0_4TypeENS_9ExprNodePES2_(ptr noundef nonnull align 8 dereferenceable(64) %26, i32 noundef 0, ptr noundef nonnull %6, ptr noundef nonnull %7)
          to label %29 unwind label %35

29:                                               ; preds = %28
  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 %26)
          to label %30 unwind label %35

30:                                               ; preds = %29
  %31 = 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 @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %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
  br label %59

32:                                               ; preds = %25
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %38

.thread:                                          ; preds = %27
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br label %37

35:                                               ; preds = %28, %29
  %.016 = phi i1 [ false, %29 ], [ true, %28 ]
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %.016, label %37, label %38

37:                                               ; preds = %.thread, %35
  %.pn3341 = phi { ptr, i32 } [ %34, %.thread ], [ %36, %35 ]
  call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 64) #10
  br label %38

38:                                               ; preds = %35, %37, %32
  %.pn33.pn = phi { ptr, i32 } [ %.pn3341, %37 ], [ %36, %35 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %60

39:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %40 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #9
          to label %41 unwind label %46

41:                                               ; preds = %39
  call void @_ZN3AST9ExprNodePC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %0)
  invoke void @_Z11Parse_Expr4R11TokenStream(ptr dead_on_unwind nonnull writable sret(%"class.AST::ExprNodeP") align 8 %10, ptr noundef nonnull align 8 dereferenceable(176) %1)
          to label %42 unwind label %.thread42

42:                                               ; preds = %41
  invoke void @_ZN3AST14ExprNode_BinOpC2ENS0_4TypeENS_9ExprNodePES2_(ptr noundef nonnull align 8 dereferenceable(64) %40, i32 noundef 1, ptr noundef nonnull %9, ptr noundef nonnull %10)
          to label %43 unwind label %49

43:                                               ; preds = %42
  invoke void @_ZL12mk_exprnodepRK11TokenStreamPN3AST8ExprNodeE(ptr dead_on_unwind nonnull writable sret(%"class.AST::ExprNodeP") align 8 %8, ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef nonnull %40)
          to label %44 unwind label %49

44:                                               ; preds = %43
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3AST9ExprNodePaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %59

46:                                               ; preds = %39
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %52

.thread42:                                        ; preds = %41
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br label %51

49:                                               ; preds = %42, %43
  %.015 = phi i1 [ false, %43 ], [ true, %42 ]
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %.015, label %51, label %52

51:                                               ; preds = %.thread42, %49
  %.pn3045 = phi { ptr, i32 } [ %48, %.thread42 ], [ %50, %49 ]
  call void @_ZdlPvm(ptr noundef nonnull %40, i64 noundef 64) #10
  br label %52

52:                                               ; preds = %49, %51, %46
  %.pn30.pn = phi { ptr, i32 } [ %.pn3045, %51 ], [ %50, %49 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %60

53:                                               ; preds = %16
  invoke void @_ZN5TokenC2EOS_(ptr noundef nonnull align 8 dereferenceable(88) %11, ptr noundef nonnull align 8 dereferenceable(88) %3)
          to label %54 unwind label %55

54:                                               ; preds = %53
  invoke void @_ZN11TokenStream7putbackE5Token(ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef nonnull %11)
          to label %62 unwind label %57

55:                                               ; preds = %53
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %60

57:                                               ; preds = %54
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %11) #8
  br label %60

59:                                               ; preds = %30, %44
  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 %12, !llvm.loop !5

60:                                               ; preds = %57, %55, %52, %38, %24
  %.pn36 = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ], [ %.pn30.pn, %52 ], [ %.pn33.pn, %38 ], [ %.pn, %24 ]
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  br label %61

61:                                               ; preds = %60, %18
  %.pn36.pn = phi { ptr, i32 } [ %.pn36, %60 ], [ %19, %18 ]
  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 } %.pn36.pn

62:                                               ; preds = %54
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %11) #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 @_ZN3AST14ExprNode_BinOpC2ENS0_4TypeENS_9ExprNodePES2_(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef, ptr noundef) unnamed_addr #3 align 2

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

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