; LLVM IR from thepowersgang/mrustc :: src/macro_rules (eval)

; 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.TraceLog = type { ptr, %"class.std::function" }
%"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.MacroExpandState = type { ptr, ptr, %"class.std::vector.327", %"class.std::vector", ptr }
%"class.std::vector.327" = type { %"struct.std::_Vector_base.328" }
%"struct.std::_Vector_base.328" = type { %"struct.std::_Vector_base<MacroExpandState::t_offset, std::allocator<MacroExpandState::t_offset>>::_Vector_impl" }
%"struct.std::_Vector_base<MacroExpandState::t_offset, std::allocator<MacroExpandState::t_offset>>::_Vector_impl" = type { %"struct.std::_Vector_base<MacroExpandState::t_offset, std::allocator<MacroExpandState::t_offset>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MacroExpandState::t_offset, std::allocator<MacroExpandState::t_offset>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Span = type { ptr }

@g_debug_indent_level = external global i32, align 4
@__func__._Z32Macro_InvokeRules_CountSubstUsesR17ParameterMappingsRKSt6vectorI17MacroExpansionEntSaIS2_EE = external hidden unnamed_addr constant [33 x i8], align 1

declare noundef zeroext i1 @_Z13debug_enabledv() #0

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 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)) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 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)) #2

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

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) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17ParameterMappings9inc_countERK4SpanRKSt6vectorIjSaIjEEj(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z32Macro_InvokeRules_CountSubstUsesR17ParameterMappingsRKSt6vectorI17MacroExpansionEntSaIS2_EE(ptr noundef nonnull align 8 dereferenceable(76) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.TraceLog, align 8
  %6 = alloca %class.MacroExpandState, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %struct.Span, align 8
  %13 = alloca %"class.std::vector", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #7
  %14 = call noundef zeroext i1 @_Z13debug_enabledv()
  %15 = zext i1 %14 to i64
  %16 = select i1 %14, ptr @__func__._Z32Macro_InvokeRules_CountSubstUsesR17ParameterMappingsRKSt6vectorI17MacroExpansionEntSaIS2_EE, ptr null
  call void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef %16)
  call void @llvm.lifetime.start.p0(i64 72, ptr %6) #7
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZN16MacroExpandStateC2ERKSt6vectorI17MacroExpansionEntSaIS1_EERK17ParameterMappings(ptr noundef nonnull align 8 dereferenceable(72) %6, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(76) %18)
          to label %19 unwind label %26

19:                                               ; preds = %2
  br label %20

20:                                               ; preds = %93, %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %21 = invoke noundef ptr @_ZN16MacroExpandState8next_entEv(ptr noundef nonnull align 8 dereferenceable(72) %6)
          to label %22 unwind label %30

22:                                               ; preds = %20
  store ptr %21, ptr %9, align 8, !tbaa !5
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %34, label %25

25:                                               ; preds = %22
  store i32 3, ptr %10, align 4
  br label %91

26:                                               ; preds = %2
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %7, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %8, align 4
  br label %97

30:                                               ; preds = %46, %44, %41, %38, %35, %20
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %7, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %8, align 4
  br label %95

34:                                               ; preds = %22
  br label %35

35:                                               ; preds = %34
  %36 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %37 unwind label %30

37:                                               ; preds = %35
  br i1 %36, label %38, label %49

38:                                               ; preds = %37
  %39 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %39, ptr noundef @__func__._Z32Macro_InvokeRules_CountSubstUsesR17ParameterMappingsRKSt6vectorI17MacroExpansionEntSaIS2_EE)
          to label %41 unwind label %30

41:                                               ; preds = %38
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK17MacroExpansionEnt(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(168) %42)
          to label %44 unwind label %30

44:                                               ; preds = %41
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @_ZSt3decRSt8ios_base)
          to label %46 unwind label %30

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %48 unwind label %30

48:                                               ; preds = %46
  br label %49

49:                                               ; preds = %48, %37
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = invoke noundef ptr @_ZNK17MacroExpansionEnt14opt_NamedValueEv(ptr noundef nonnull align 8 dereferenceable(168) %52)
          to label %54 unwind label %61

54:                                               ; preds = %51
  store ptr %53, ptr %11, align 8, !tbaa !5
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %90

57:                                               ; preds = %54
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = and i32 %59, -1073741824
  switch i32 %60, label %88 [
    i32 0, label %65
    i32 -2147483648, label %65
    i32 1073741824, label %87
  ]

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

65:                                               ; preds = %57, %57
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  invoke void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %67 unwind label %73

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #7
  invoke void @_ZNK16MacroExpandState10iterationsEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(72) %6)
          to label %68 unwind label %77

68:                                               ; preds = %67
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = and i32 %70, 1073741823
  invoke void @_ZN17ParameterMappings9inc_countERK4SpanRKSt6vectorIjSaIjEEj(ptr noundef nonnull align 8 dereferenceable(76) %66, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %71)
          to label %72 unwind label %81

72:                                               ; preds = %68
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %89

73:                                               ; preds = %65
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %7, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %8, align 4
  br label %86

77:                                               ; preds = %67
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  br label %85

81:                                               ; preds = %68
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br label %85

85:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %86

86:                                               ; preds = %85, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %94

87:                                               ; preds = %57
  br label %88

88:                                               ; preds = %87, %57
  br label %89

89:                                               ; preds = %88, %72
  br label %90

90:                                               ; preds = %89, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  store i32 0, ptr %10, align 4
  br label %91

91:                                               ; preds = %90, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %92 = load i32, ptr %10, align 4
  switch i32 %92, label %103 [
    i32 0, label %93
    i32 3, label %96
  ]

93:                                               ; preds = %91
  br label %20, !llvm.loop !11

94:                                               ; preds = %86, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %95

95:                                               ; preds = %94, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @_ZN16MacroExpandStateD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %6) #7
  br label %97

96:                                               ; preds = %91
  call void @_ZN16MacroExpandStateD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %6) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #7
  ret void

97:                                               ; preds = %95, %26
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #7
  br label %98

98:                                               ; preds = %97
  %99 = load ptr, ptr %7, align 8
  %100 = load i32, ptr %8, align 4
  %101 = insertvalue { ptr, i32 } poison, ptr %99, 0
  %102 = insertvalue { ptr, i32 } %101, i32 %100, 1
  resume { ptr, i32 } %102

103:                                              ; preds = %91
  unreachable
}

; Function Attrs: nounwind
declare void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5

declare void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16MacroExpandStateC2ERKSt6vectorI17MacroExpansionEntSaIS1_EERK17ParameterMappings(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN16MacroExpandState8next_entEv(ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK17MacroExpansionEnt(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(168)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16MacroExpandState10iterationsEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

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

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

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

!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 = !{!"int", !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.TraceLog = type { ptr, %"class.std::function" }
%"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.MacroExpandState = type { ptr, ptr, %"class.std::vector.327", %"class.std::vector", ptr }
%"class.std::vector.327" = type { %"struct.std::_Vector_base.328" }
%"struct.std::_Vector_base.328" = type { %"struct.std::_Vector_base<MacroExpandState::t_offset, std::allocator<MacroExpandState::t_offset>>::_Vector_impl" }
%"struct.std::_Vector_base<MacroExpandState::t_offset, std::allocator<MacroExpandState::t_offset>>::_Vector_impl" = type { %"struct.std::_Vector_base<MacroExpandState::t_offset, std::allocator<MacroExpandState::t_offset>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MacroExpandState::t_offset, std::allocator<MacroExpandState::t_offset>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Span = type { ptr }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@__func__._Z32Macro_InvokeRules_CountSubstUsesR17ParameterMappingsRKSt6vectorI17MacroExpansionEntSaIS2_EE = external hidden unnamed_addr constant [33 x i8], align 1

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #0

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

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

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

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

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) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17ParameterMappings9inc_countERK4SpanRKSt6vectorIjSaIjEEj(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z32Macro_InvokeRules_CountSubstUsesR17ParameterMappingsRKSt6vectorI17MacroExpansionEntSaIS2_EE(ptr noundef nonnull align 8 dereferenceable(76) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.TraceLog, align 8
  %4 = alloca %class.MacroExpandState, align 8
  %5 = alloca %struct.Span, align 8
  %6 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #7
  %7 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  %8 = select i1 %7, ptr @__func__._Z32Macro_InvokeRules_CountSubstUsesR17ParameterMappingsRKSt6vectorI17MacroExpansionEntSaIS2_EE, ptr null
  call void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef %8)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #7
  invoke void @_ZN16MacroExpandStateC2ERKSt6vectorI17MacroExpansionEntSaIS1_EERK17ParameterMappings(ptr noundef nonnull align 8 dereferenceable(72) %4, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(76) %0)
          to label %.preheader unwind label %11

.preheader:                                       ; preds = %2, %.preheader.backedge
  %9 = invoke noundef ptr @_ZN16MacroExpandState8next_entEv(ptr noundef nonnull align 8 dereferenceable(72) %4)
          to label %10 unwind label %13

10:                                               ; preds = %.preheader
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %44, label %15

11:                                               ; preds = %2
  %12 = landingpad { ptr, i32 }
          cleanup
  br label %45

13:                                               ; preds = %25, %23, %21, %18, %15, %.preheader
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %43

15:                                               ; preds = %10
  %16 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %17 unwind label %13

17:                                               ; preds = %15
  br i1 %16, label %18, label %27

18:                                               ; preds = %17
  %19 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !5
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %19, ptr noundef nonnull @__func__._Z32Macro_InvokeRules_CountSubstUsesR17ParameterMappingsRKSt6vectorI17MacroExpansionEntSaIS2_EE)
          to label %21 unwind label %13

21:                                               ; preds = %18
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK17MacroExpansionEnt(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(168) %9)
          to label %23 unwind label %13

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

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

27:                                               ; preds = %25, %17
  %28 = call noundef ptr @_ZNK17MacroExpansionEnt14opt_NamedValueEv(ptr noundef nonnull align 8 dereferenceable(168) %9)
  %.not17 = icmp eq ptr %28, null
  br i1 %.not17, label %.preheader.backedge, label %29

.preheader.backedge:                              ; preds = %27, %29, %29, %37
  br label %.preheader

29:                                               ; preds = %27
  %30 = load i32, ptr %28, align 4, !tbaa !5
  %31 = lshr i32 %30, 30
  %32 = xor i32 %31, 2
  switch i32 %32, label %default.unreachable [
    i32 2, label %33
    i32 0, label %33
    i32 3, label %.preheader.backedge
    i32 1, label %.preheader.backedge
  ]

33:                                               ; preds = %29, %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  invoke void @_ZNK16MacroExpandState10iterationsEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(72) %4)
          to label %34 unwind label %38

34:                                               ; preds = %33
  %35 = load i32, ptr %28, align 4, !tbaa !5
  %36 = and i32 %35, 1073741823
  invoke void @_ZN17ParameterMappings9inc_countERK4SpanRKSt6vectorIjSaIjEEj(ptr noundef nonnull align 8 dereferenceable(76) %0, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %36)
          to label %37 unwind label %40

37:                                               ; preds = %34
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %.preheader.backedge

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

40:                                               ; preds = %34
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %43

default.unreachable:                              ; preds = %29
  unreachable

43:                                               ; preds = %42, %13
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %14, %13 ]
  call void @_ZN16MacroExpandStateD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %4) #7
  br label %45

44:                                               ; preds = %10
  call void @_ZN16MacroExpandStateD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %4) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #7
  ret void

45:                                               ; preds = %43, %11
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %43 ], [ %12, %11 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: nounwind
declare void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5

declare void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16MacroExpandStateC2ERKSt6vectorI17MacroExpansionEntSaIS1_EERK17ParameterMappings(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN16MacroExpandState8next_entEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK17MacroExpansionEnt(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16MacroExpandState10iterationsEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

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

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

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass