// File: yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::BackReference::parse_core(char const*, unsigned long, peg::SemanticValues&, peg::Context&, std::any&) const
inline size_t BackReference::parse_core(const char *s, size_t n,
                                        SemanticValues &vs, Context &c,
                                        std::any &dt) const {
  auto size = static_cast<int>(c.capture_scope_stack_size);
  for (auto i = size - 1; i >= 0; i--) {
    auto index = static_cast<size_t>(i);
    const auto &cs = c.capture_scope_stack[index];
    if (cs.find(name_) != cs.end()) {
      const auto &lit = cs.at(name_);
      std::once_flag init_is_word;
      auto is_word = false;
      return parse_literal(s, n, vs, c, dt, lit, init_is_word, is_word, false);
    }
  }

  c.error_info.message_pos = s;
  c.error_info.message = "undefined back reference '$" + name_ + "'...";
  return static_cast<size_t>(-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
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, -0xe8(%rbp)
movq -0x30(%rbp), %rax
movq 0x130(%rax), %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jl 0xfda1
movslq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rdi
addq $0x118, %rdi            # imm = 0x118
movq -0x48(%rbp), %rsi
callq 0xfe70
movq -0xe8(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xf0(%rbp)
addq $0x8, %rdi
callq 0xa420
movq -0xf0(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
leaq -0x68(%rbp), %rsi
callq 0xfec0
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0xfef0
movq %rax, -0x70(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xfe90
testb $0x1, %al
jne 0xfcf9
jmp 0xfd91
movq -0xe8(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0xf8(%rbp)
addq $0x8, %rdi
callq 0xa420
movq -0xf8(%rbp), %rdi
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
leaq -0x88(%rbp), %rsi
callq 0xff20
movq %rax, -0x78(%rbp)
leaq -0x8c(%rbp), %rdi
callq 0xffc0
movb $0x0, -0x8d(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x78(%rbp), %r9
leaq -0x8c(%rbp), %r10
leaq -0x8d(%rbp), %rax
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0xdfa0
movq %rax, -0x8(%rbp)
jmp 0xfe48
jmp 0xfd93
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xfc75
movq -0xe8(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
addq $0x8, %rdx
leaq 0x91a42(%rip), %rsi     # 0xa1801
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x10030
movq -0x100(%rbp), %rsi
leaq 0x91a3d(%rip), %rdx     # 0xa181d
leaq -0xb0(%rbp), %rdi
callq 0xffe0
jmp 0xfdee
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
addq $0x28, %rdi
leaq -0xb0(%rbp), %rsi
callq 0xa4a0
leaq -0xb0(%rbp), %rdi
callq 0xa250
leaq -0xd0(%rbp), %rdi
callq 0xa250
movq $-0x1, -0x8(%rbp)
jmp 0xfe48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0xa250
jmp 0xfe55
movq -0x8(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0xd8(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)