// File: yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::Reference::parse_core(char const*, unsigned long, peg::SemanticValues&, peg::Context&, std::any&) const
inline size_t Reference::parse_core(const char *s, size_t n, SemanticValues &vs,
                                    Context &c, std::any &dt) const {
  auto save_ignore_trace_state = c.ignore_trace_state;
  if (rule_ && rule_->ignoreSemanticValue) {
    c.ignore_trace_state = !c.verbose_trace;
  }
  auto se =
      scope_exit([&]() { c.ignore_trace_state = save_ignore_trace_state; });

  if (rule_) {
    // Reference rule
    if (rule_->is_macro) {
      // Macro
      FindReference vis(c.top_args(), c.rule_stack.back()->params);

      // Collect arguments
      std::vector<std::shared_ptr<Ope>> args;
      for (auto arg : args_) {
        arg->accept(vis);
        args.emplace_back(std::move(vis.found_ope));
      }

      c.push_args(std::move(args));
      auto se = scope_exit([&]() { c.pop_args(); });
      auto ope = get_core_operator();
      return ope->parse(s, n, vs, c, dt);
    } else {
      // Definition
      c.push_args(std::vector<std::shared_ptr<Ope>>());
      auto se = scope_exit([&]() { c.pop_args(); });
      auto ope = get_core_operator();
      return ope->parse(s, n, vs, c, dt);
    }
  } else {
    // Reference parameter in macro
    const auto &args = c.top_args();
    return args[iarg_]->parse(s, n, vs, c, dt);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x30(%rbp), %rcx
movb 0x288(%rcx), %cl
andb $0x1, %cl
movb %cl, -0x39(%rbp)
cmpq $0x0, 0x68(%rax)
je 0xf273
movq -0x168(%rbp), %rax
movq 0x68(%rax), %rax
testb $0x1, 0xc0(%rax)
je 0xf273
movq -0x30(%rbp), %rax
movb 0x240(%rax), %cl
xorb $-0x1, %cl
movq -0x30(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x288(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x39(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xf740
movq -0x168(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xf68d
movq -0x168(%rbp), %rax
movq 0x68(%rax), %rax
testb $0x1, 0xe9(%rax)
je 0xf53b
movq -0x30(%rbp), %rdi
callq 0xf770
movq %rax, -0x170(%rbp)
jmp 0xf2cc
movq -0x30(%rbp), %rdi
addq $0xb8, %rdi
callq 0xf7b0
movq -0x170(%rbp), %rsi
movq (%rax), %rdx
addq $0xf0, %rdx
leaq -0x90(%rbp), %rdi
callq 0xf7f0
jmp 0xf2fb
leaq -0xb8(%rbp), %rdi
callq 0xf850
movq -0x168(%rbp), %rax
addq $0x50, %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0xf870
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0xf8a0
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xf8d0
testb $0x1, %al
jne 0xf35b
jmp 0xf40a
leaq -0xc8(%rbp), %rdi
callq 0xf910
movq %rax, %rsi
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0xf930
movq -0x178(%rbp), %rdi
callq 0xded0
movq %rax, %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
leaq -0x90(%rbp), %rsi
callq *%rax
jmp 0xf39e
leaq -0x88(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0xf960
jmp 0xf3b3
leaq -0xe0(%rbp), %rdi
callq 0xda50
leaq -0xc8(%rbp), %rdi
callq 0xf9e0
jmp 0xf33f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf71c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xda50
jmp 0xf51e
movq -0x30(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xfa00
jmp 0xf41c
movq -0x30(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xfa30
jmp 0xf43c
movq -0x168(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0xfa50
jmp 0xf451
leaq -0x108(%rbp), %rdi
callq 0xded0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0xdaf0
movq %rax, -0x180(%rbp)
jmp 0xf482
movq -0x180(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x10c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xda50
leaq -0xf0(%rbp), %rdi
callq 0xfa90
leaq -0xb8(%rbp), %rdi
callq 0xfad0
leaq -0x90(%rbp), %rdi
callq 0xfb30
jmp 0xf706
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf51e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf512
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xda50
leaq -0xf0(%rbp), %rdi
callq 0xfa90
leaq -0xb8(%rbp), %rdi
callq 0xfad0
leaq -0x90(%rbp), %rdi
callq 0xfb30
jmp 0xf71c
movq -0x30(%rbp), %rax
movq %rax, -0x190(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x130(%rbp)
movq $0x0, -0x120(%rbp)
leaq -0x130(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0xf850
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rsi
callq 0xfa00
jmp 0xf583
leaq -0x130(%rbp), %rdi
callq 0xfad0
movq -0x30(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xfb70
jmp 0xf5af
movq -0x168(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0xfa50
jmp 0xf5c4
leaq -0x158(%rbp), %rdi
callq 0xded0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0xdaf0
movq %rax, -0x198(%rbp)
jmp 0xf5f5
movq -0x198(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x10c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0xda50
leaq -0x140(%rbp), %rdi
callq 0xfb90
jmp 0xf706
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xfad0
jmp 0xf71c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xf67c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0xda50
leaq -0x140(%rbp), %rdi
callq 0xfb90
jmp 0xf71c
movq -0x30(%rbp), %rdi
callq 0xf770
movq %rax, -0x1a0(%rbp)
jmp 0xf69f
movq -0x168(%rbp), %rax
movq -0x1a0(%rbp), %rcx
movq %rcx, -0x160(%rbp)
movq -0x160(%rbp), %rdi
movq 0x70(%rax), %rsi
callq 0xfbd0
movq %rax, %rdi
callq 0xded0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0xdaf0
movq %rax, -0x1a8(%rbp)
jmp 0xf6f1
movq -0x1a8(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x10c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xfbf0
movq -0x8(%rbp), %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0xfbf0
movq -0x98(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)