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

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

@gTargetVersion = external global i32, align 4

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
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 @_Z13Parse_Expr1_5R11TokenStream(ptr dead_on_unwind noalias writable sret(%"class.AST::ExprNodeP") align 8, ptr noundef nonnull align 8 dereferenceable(176)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13Parse_Expr1_2R11TokenStream(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 @_Z13Parse_Expr1_5R11TokenStream, 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 = %142, %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 %127 [
    i32 49, label %45
    i32 48, 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 %144

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 %143

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 7, 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 %139

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 %143

84:                                               ; preds = %31
  %85 = load i32, ptr @gTargetVersion, align 4, !tbaa !9
  %86 = icmp sge i32 %85, 1
  br i1 %86, label %87, label %126

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

90:                                               ; preds = %87
  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 %91 unwind label %103

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

94:                                               ; preds = %91
  invoke void @_ZN3AST14ExprNode_BinOpC2ENS0_4TypeENS_9ExprNodePES2_(ptr noundef nonnull align 8 dereferenceable(64) %89, i32 noundef 7, ptr noundef %16, ptr noundef %17)
          to label %95 unwind label %111

95:                                               ; preds = %94
  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) %88, ptr noundef %89)
          to label %96 unwind label %111

96:                                               ; preds = %95
  %97 = 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 %98 unwind label %115

98:                                               ; preds = %96
  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 %139

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

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

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

111:                                              ; preds = %95, %94
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %8, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %9, align 4
  br label %119

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

119:                                              ; preds = %115, %111
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br label %120

120:                                              ; preds = %119, %107
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  br label %121

121:                                              ; preds = %120, %103
  %122 = load i1, ptr %18, align 1
  br i1 %122, label %123, label %124

123:                                              ; preds = %121
  call void @_ZdlPvm(ptr noundef %89, i64 noundef 64) #10
  br label %124

124:                                              ; preds = %123, %121
  br label %125

125:                                              ; preds = %124, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %143

126:                                              ; preds = %84
  br label %127

127:                                              ; preds = %126, %31
  %128 = 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 %129 unwind label %131

129:                                              ; preds = %127
  invoke void @_ZN11TokenStream7putbackE5Token(ptr noundef nonnull align 8 dereferenceable(176) %128, ptr noundef %19)
          to label %130 unwind label %135

130:                                              ; preds = %129
  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 %140

131:                                              ; preds = %127
  %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
  br label %143

135:                                              ; preds = %129
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %8, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %9, align 4
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %19) #8
  br label %143

139:                                              ; preds = %98, %56
  store i32 0, ptr %20, align 4
  br label %140

140:                                              ; preds = %139, %130
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %7) #8
  %141 = load i32, ptr %20, align 4
  switch i32 %141, label %145 [
    i32 0, label %142
  ]

142:                                              ; preds = %140
  br label %23, !llvm.loop !11

143:                                              ; preds = %135, %131, %125, %83, %44
  call void @_ZN5TokenD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #8
  br label %144

144:                                              ; preds = %143, %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 %149

145:                                              ; preds = %140
  %146 = load i1, ptr %6, align 1
  br i1 %146, label %148, label %147

147:                                              ; preds = %145
  call void @_ZN3AST9ExprNodePD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #8
  br label %148

148:                                              ; preds = %147, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void

149:                                              ; preds = %144
  %150 = load ptr, ptr %8, align 8
  %151 = load i32, ptr %9, align 4
  %152 = insertvalue { ptr, i32 } poison, ptr %150, 0
  %153 = insertvalue { ptr, i32 } %152, i32 %151, 1
  resume { ptr, i32 } %153
}

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 = !{!10, !10, i64 0}
!10 = !{!"_ZTS13TargetVersion", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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 }

@gTargetVersion = external local_unnamed_addr global i32, align 4

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
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 @_Z13Parse_Expr1_5R11TokenStream(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
define dso_local void @_Z13Parse_Expr1_2R11TokenStream(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 @_Z13Parse_Expr1_5R11TokenStream(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 = %62, %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 %56 [
    i32 49, label %25
    i32 48, label %39
  ]

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

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 %63

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 @_Z13Parse_Expr1_5R11TokenStream(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 7, 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 %62

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 %63

39:                                               ; preds = %16
  %40 = load i32, ptr @gTargetVersion, align 4, !tbaa !5
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %42, label %56

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

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

45:                                               ; preds = %44
  invoke void @_ZN3AST14ExprNode_BinOpC2ENS0_4TypeENS_9ExprNodePES2_(ptr noundef nonnull align 8 dereferenceable(64) %43, i32 noundef 7, ptr noundef nonnull %9, ptr noundef nonnull %10)
          to label %46 unwind label %52

46:                                               ; preds = %45
  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 %43)
          to label %47 unwind label %52

47:                                               ; preds = %46
  %48 = 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 %62

49:                                               ; preds = %42
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %55

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

52:                                               ; preds = %45, %46
  %.015 = phi i1 [ false, %46 ], [ true, %45 ]
  %53 = 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 %54, label %55

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

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

56:                                               ; preds = %39, %16
  invoke void @_ZN5TokenC2EOS_(ptr noundef nonnull align 8 dereferenceable(88) %11, ptr noundef nonnull align 8 dereferenceable(88) %3)
          to label %57 unwind label %58

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

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

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

62:                                               ; preds = %30, %47
  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 !9

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

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

65:                                               ; preds = %57
  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
}

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 = !{!6, !6, i64 0}
!6 = !{!"_ZTS13TargetVersion", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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