; LLVM IR from thepowersgang/mrustc :: src/expand (mod)

; 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.std::unique_ptr.273" = type { %"struct.std::__uniq_ptr_data.274" }
%"struct.std::__uniq_ptr_data.274" = type { %"class.std::__uniq_ptr_impl.275" }
%"class.std::__uniq_ptr_impl.275" = type { %"class.std::tuple.276" }
%"class.std::tuple.276" = type { %"struct.std::_Tuple_impl.277" }
%"struct.std::_Tuple_impl.277" = type { %"struct.std::_Head_base.280" }
%"struct.std::_Head_base.280" = type { ptr }
%struct.LList = type { ptr, ptr }
%struct.Span = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.293 = type { ptr }
%struct.ExpandState = type <{ ptr, %struct.LList, i32, i8, i8, [2 x i8] }>
%struct.ParseState = type { i8, i8, i8, ptr, ptr, ptr }

@g_debug_indent_level = external global i32, align 4
@_ZTISt13runtime_error = external constant ptr
@.str.23 = external hidden unnamed_addr constant [24 x i8], align 1
@__FUNCTION__._Z12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS2_4PathERK8RcStringR9TokenTree = external hidden unnamed_addr constant [13 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [62 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() #1

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

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

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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z18Expand_Macro_InnerRKN3AST5CrateE5LListIPKNS_6ModuleEERS4_4SpanRKNS_4PathERK8RcStringR9TokenTree(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.273") align 8, ptr noundef nonnull align 8 dereferenceable(1112), ptr, ptr, ptr noundef nonnull align 8 dereferenceable(480), ptr noundef, ptr noundef nonnull align 8 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(136)) #4

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

declare void @_ZNK4Span5errorE9ErrorTypeSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS2_4PathERK8RcStringR9TokenTree(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.273") align 8 %0, ptr noundef nonnull align 8 dereferenceable(30) %1, ptr noundef nonnull align 8 dereferenceable(480) %2, ptr noundef %3, ptr noundef nonnull align 8 dereferenceable(240) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(136) %6) #4 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i1, align 1
  %16 = alloca %struct.LList, align 8
  %17 = alloca %struct.Span, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %struct.Span, align 8
  %21 = alloca %"class.std::function", align 8
  %22 = alloca %class.anon.293, align 8
  store ptr %0, ptr %8, align 8
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  store i1 false, ptr %15, align 1
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.ExpandState, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ExpandState, ptr %26, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !14
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  %32 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8
  %34 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8
  invoke void @_Z18Expand_Macro_InnerRKN3AST5CrateE5LListIPKNS_6ModuleEERS4_4SpanRKNS_4PathERK8RcStringR9TokenTree(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.273") align 8 %0, ptr noundef nonnull align 8 dereferenceable(1112) %25, ptr %33, ptr %35, ptr noundef nonnull align 8 dereferenceable(480) %28, ptr noundef %17, ptr noundef nonnull align 8 dereferenceable(240) %29, ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(136) %31)
          to label %36 unwind label %54

36:                                               ; preds = %7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  %37 = call noundef zeroext i1 @_ZNKSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br i1 %37, label %38, label %77

38:                                               ; preds = %36
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ExpandState, ptr %39, i32 0, i32 3
  store i8 1, ptr %40, align 4, !tbaa !15
  br label %41

41:                                               ; preds = %38
  %42 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %43 unwind label %58

43:                                               ; preds = %41
  br i1 %42, label %44, label %62

44:                                               ; preds = %43
  %45 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !16
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %45, ptr noundef @__FUNCTION__._Z12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS2_4PathERK8RcStringR9TokenTree)
          to label %47 unwind label %58

47:                                               ; preds = %44
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef @.str.26)
          to label %49 unwind label %58

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

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

53:                                               ; preds = %51
  br label %62

54:                                               ; preds = %7
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %18, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %19, align 4
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %129

58:                                               ; preds = %116, %114, %112, %109, %106, %89, %70, %64, %51, %49, %47, %44, %41
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %18, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %19, align 4
  br label %128

62:                                               ; preds = %53, %43
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ExpandState, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = call noundef ptr @_ZNKSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %69 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %68)
          to label %70 unwind label %58

70:                                               ; preds = %64
  %71 = getelementptr inbounds %struct.ParseState, ptr %69, i32 0, i32 3
  store ptr %67, ptr %71, align 8, !tbaa !18
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = call noundef ptr @_ZNKSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %74 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %73)
          to label %75 unwind label %58

75:                                               ; preds = %70
  %76 = getelementptr inbounds %struct.ParseState, ptr %74, i32 0, i32 4
  store ptr %72, ptr %76, align 8, !tbaa !20
  br label %124

77:                                               ; preds = %36
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ExpandState, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 8, !tbaa !21
  %81 = icmp eq i32 %80, 2
  br i1 %81, label %82, label %105

82:                                               ; preds = %77
  br label %83

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  invoke void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %84 unwind label %90

84:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %85 = getelementptr inbounds %class.anon.293, ptr %22, i32 0, i32 0
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %86, ptr %85, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS7_4PathERK8RcStringR9TokenTreeE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  invoke void @_ZNK4Span5errorE9ErrorTypeSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %20, i32 noundef 0, ptr noundef %21)
          to label %87 unwind label %94

87:                                               ; preds = %84
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  %88 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %88, ptr noundef @.str.23)
          to label %89 unwind label %99

89:                                               ; preds = %87
  invoke void @__cxa_throw(ptr %88, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
          to label %134 unwind label %58

90:                                               ; preds = %83
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %18, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %19, align 4
  br label %98

94:                                               ; preds = %84
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %18, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %19, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br label %98

98:                                               ; preds = %94, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %128

99:                                               ; preds = %87
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %18, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %19, align 4
  call void @__cxa_free_exception(ptr %88) #7
  br label %128

103:                                              ; No predecessors!
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104, %77
  br label %106

106:                                              ; preds = %105
  %107 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %108 unwind label %58

108:                                              ; preds = %106
  br i1 %107, label %109, label %119

109:                                              ; preds = %108
  %110 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !16
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %110, ptr noundef @__FUNCTION__._Z12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS2_4PathERK8RcStringR9TokenTree)
          to label %112 unwind label %58

112:                                              ; preds = %109
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef @.str.27)
          to label %114 unwind label %58

114:                                              ; preds = %112
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef @_ZSt3decRSt8ios_base)
          to label %116 unwind label %58

116:                                              ; preds = %114
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %118 unwind label %58

118:                                              ; preds = %116
  br label %119

119:                                              ; preds = %118, %108
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ExpandState, ptr %122, i32 0, i32 4
  store i8 1, ptr %123, align 1, !tbaa !22
  br label %124

124:                                              ; preds = %121, %75
  store i1 true, ptr %15, align 1
  %125 = load i1, ptr %15, align 1
  br i1 %125, label %127, label %126

126:                                              ; preds = %124
  call void @_ZNSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %127

127:                                              ; preds = %126, %124
  ret void

128:                                              ; preds = %99, %98, %58
  call void @_ZNSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %129

129:                                              ; preds = %128, %54
  %130 = load ptr, ptr %18, align 8
  %131 = load i32, ptr %19, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133

134:                                              ; preds = %89
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZ12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS7_4PathERK8RcStringR9TokenTreeE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

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

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

!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, !6, i64 0}
!10 = !{!"_ZTS11ExpandState", !6, i64 0, !11, i64 8, !12, i64 24, !13, i64 28, !13, i64 29}
!11 = !{!"_ZTS5LListIPKN3AST6ModuleEE", !6, i64 0, !6, i64 8}
!12 = !{!"_ZTS10ExpandMode", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!15 = !{!10, !13, i64 28}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!19, !6, i64 8}
!19 = !{!"_ZTS10ParseState", !13, i64 0, !13, i64 1, !13, i64 2, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!19, !6, i64 16}
!21 = !{!10, !12, i64 24}
!22 = !{!10, !13, i64 29}


; 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.std::unique_ptr.273" = type { %"struct.std::__uniq_ptr_data.274" }
%"struct.std::__uniq_ptr_data.274" = type { %"class.std::__uniq_ptr_impl.275" }
%"class.std::__uniq_ptr_impl.275" = type { %"class.std::tuple.276" }
%"class.std::tuple.276" = type { %"struct.std::_Tuple_impl.277" }
%"struct.std::_Tuple_impl.277" = type { %"struct.std::_Head_base.280" }
%"struct.std::_Head_base.280" = type { ptr }
%struct.Span = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.293 = type { ptr }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@_ZTISt13runtime_error = external constant ptr
@.str.23 = external hidden unnamed_addr constant [24 x i8], align 1
@__FUNCTION__._Z12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS2_4PathERK8RcStringR9TokenTree = external hidden unnamed_addr constant [13 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [62 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #1

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

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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z18Expand_Macro_InnerRKN3AST5CrateE5LListIPKNS_6ModuleEERS4_4SpanRKNS_4PathERK8RcStringR9TokenTree(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.273") align 8, ptr noundef nonnull align 8 dereferenceable(1112), ptr, ptr, ptr noundef nonnull align 8 dereferenceable(480), ptr noundef, ptr noundef nonnull align 8 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS2_4PathERK8RcStringR9TokenTree(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.273") align 8 %0, ptr nocapture noundef nonnull align 8 dereferenceable(30) %1, ptr noundef nonnull align 8 dereferenceable(480) %2, ptr noundef nonnull %3, ptr noundef nonnull align 8 dereferenceable(240) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(136) %6) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %8 = alloca %struct.Span, align 8
  %9 = alloca %struct.Span, align 8
  %10 = alloca %"class.std::function", align 8
  %11 = alloca %class.anon.293, align 8
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %.sroa.0.0.copyload = load ptr, ptr %13, align 8, !tbaa !13
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 16
  %.sroa.2.0.copyload = load ptr, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !13
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %3)
  invoke void @_Z18Expand_Macro_InnerRKN3AST5CrateE5LListIPKNS_6ModuleEERS4_4SpanRKNS_4PathERK8RcStringR9TokenTree(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.273") align 8 %0, ptr noundef nonnull align 8 dereferenceable(1112) %12, ptr %.sroa.0.0.copyload, ptr %.sroa.2.0.copyload, ptr noundef nonnull align 8 dereferenceable(480) %2, ptr noundef nonnull %8, ptr noundef nonnull align 8 dereferenceable(240) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(136) %6)
          to label %14 unwind label %29

14:                                               ; preds = %7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %15 = call noundef zeroext i1 @_ZNKSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br i1 %15, label %16, label %41

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %1, i64 28
  store i8 1, ptr %17, align 4, !tbaa !14
  %18 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %19 unwind label %31

19:                                               ; preds = %16
  br i1 %18, label %20, label %33

20:                                               ; preds = %19
  %21 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !15
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %21, ptr noundef nonnull @__FUNCTION__._Z12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS2_4PathERK8RcStringR9TokenTree)
          to label %23 unwind label %31

23:                                               ; preds = %20
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str.26)
          to label %25 unwind label %31

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

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

29:                                               ; preds = %7
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br label %73

31:                                               ; preds = %67, %65, %63, %60, %57, %49, %27, %25, %23, %20, %16
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %72

33:                                               ; preds = %27, %19
  %34 = load ptr, ptr %1, align 8, !tbaa !5
  %35 = call noundef ptr @_ZNKSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %35)
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  store ptr %34, ptr %37, align 8, !tbaa !17
  %38 = call noundef ptr @_ZNKSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  %39 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %38)
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  store ptr %2, ptr %40, align 8, !tbaa !19
  br label %71

41:                                               ; preds = %14
  %42 = getelementptr inbounds i8, ptr %1, i64 24
  %43 = load i32, ptr %42, align 8, !tbaa !20
  %44 = icmp eq i32 %43, 2
  br i1 %44, label %45, label %57

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  invoke void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %46 unwind label %50

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  store ptr %4, ptr %11, align 8, !tbaa !13
  call void @"_ZNSt8functionIFvRSoEEC2IZ12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS7_4PathERK8RcStringR9TokenTreeE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  invoke void @_ZNK4Span5errorE9ErrorTypeSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0, ptr noundef nonnull %10)
          to label %47 unwind label %52

47:                                               ; preds = %46
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %48 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull @.str.23)
          to label %49 unwind label %55

49:                                               ; preds = %47
  invoke void @__cxa_throw(ptr nonnull %48, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
          to label %74 unwind label %31

50:                                               ; preds = %45
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %46
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %54

54:                                               ; preds = %52, %50
  %.pn = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %72

55:                                               ; preds = %47
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %48) #6
  br label %72

57:                                               ; preds = %41
  %58 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %59 unwind label %31

59:                                               ; preds = %57
  br i1 %58, label %60, label %69

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

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

65:                                               ; preds = %63
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %67 unwind label %31

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %69 unwind label %31

69:                                               ; preds = %67, %59
  %70 = getelementptr inbounds i8, ptr %1, i64 29
  store i8 1, ptr %70, align 1, !tbaa !21
  br label %71

71:                                               ; preds = %33, %69
  ret void

72:                                               ; preds = %55, %54, %31
  %.pn18 = phi { ptr, i32 } [ %32, %31 ], [ %56, %55 ], [ %.pn, %54 ]
  call void @_ZNSt10unique_ptrI11TokenStreamSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br label %73

73:                                               ; preds = %72, %29
  %.pn18.pn = phi { ptr, i32 } [ %.pn18, %72 ], [ %30, %29 ]
  resume { ptr, i32 } %.pn18.pn

74:                                               ; preds = %49
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZ12Expand_MacroRK11ExpandStateRN3AST6ModuleE4SpanRKNS7_4PathERK8RcStringR9TokenTreeE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

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

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

!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, !7, i64 0}
!6 = !{!"_ZTS11ExpandState", !7, i64 0, !10, i64 8, !11, i64 24, !12, i64 28, !12, i64 29}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS5LListIPKN3AST6ModuleEE", !7, i64 0, !7, i64 8}
!11 = !{!"_ZTS10ExpandMode", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !12, i64 28}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = !{!18, !7, i64 8}
!18 = !{!"_ZTS10ParseState", !12, i64 0, !12, i64 1, !12, i64 2, !7, i64 8, !7, i64 16, !7, i64 24}
!19 = !{!18, !7, i64 16}
!20 = !{!6, !11, i64 24}
!21 = !{!6, !12, i64 29}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass