// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r13
movq %rdi, %rbx
movb 0x288(%r8), %r12b
movq 0x68(%rdi), %rax
testq %rax, %rax
je 0xb8bb
cmpb $0x1, 0xc0(%rax)
jne 0xb778
movb 0x240(%r15), %cl
xorb $0x1, %cl
movb %cl, 0x288(%r15)
leaq 0xd0(%r15), %r8
cmpb $0x1, 0xe9(%rax)
movq %rdx, -0x48(%rbp)
movq %rsi, -0x40(%rbp)
jne 0xb8e8
movq %r13, -0xa0(%rbp)
movq %r14, -0xa8(%rbp)
movb %r12b, -0x29(%rbp)
movq 0xc0(%r15), %rax
movq %r15, -0x38(%rbp)
movq 0xd8(%r15), %rcx
movl $0xf0, %edx
addq -0x8(%rax), %rdx
addq $-0x18, %rcx
leaq 0x5129c(%rip), %rax     # 0x5ca68
movq %rax, -0x70(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x68(%rbp)
movq %rcx, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
movq 0x50(%rbx), %r14
movq %rbx, -0x98(%rbp)
movq 0x58(%rbx), %r12
cmpq %r12, %r14
je 0xb85c
leaq -0x90(%rbp), %r15
movq (%r14), %rdi
movq 0x8(%r14), %rbx
testq %rbx, %rbx
je 0xb82a
movq 0x52754(%rip), %rax     # 0x5df70
cmpb $0x0, (%rax)
je 0xb826
incl 0x8(%rbx)
jmp 0xb82a
lock
incl 0x8(%rbx)
movq %r8, %r13
movq (%rdi), %rax
leaq -0x70(%rbp), %rsi
callq *0x18(%rax)
movq %r15, %rdi
leaq -0x68(%rbp), %rsi
callq 0xbac2
testq %rbx, %rbx
je 0xb850
movq %rbx, %rdi
callq 0x123fc
addq $0x10, %r14
cmpq %r12, %r14
movq %r13, %r8
jne 0xb809
leaq -0x90(%rbp), %rsi
movq %r8, %rdi
callq 0x1299e
movq -0x98(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x1c0(%rax), %rdi
movq 0x1c8(%rax), %rbx
testq %rbx, %rbx
movq -0x38(%rbp), %r15
movb -0x29(%rbp), %r12b
movq -0xa8(%rbp), %r9
movq -0xa0(%rbp), %rcx
je 0xb97a
movq 0x526c6(%rip), %rax     # 0x5df70
cmpb $0x0, (%rax)
je 0xb976
incl 0x8(%rbx)
jmp 0xb97a
movq 0xd8(%r15), %rax
movq 0x70(%rbx), %rcx
movq -0x18(%rax), %rax
shlq $0x4, %rcx
movq (%rax,%rcx), %rdi
movq %r13, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0xa7b8
movq %rax, %r14
jmp 0xb9d6
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %r8, %rdi
callq 0x1299e
leaq -0x70(%rbp), %rdi
callq 0xbb18
movq 0x68(%rbx), %rax
movq 0x1c0(%rax), %rdi
movq 0x1c8(%rax), %rbx
testq %rbx, %rbx
je 0xb937
movq 0x52647(%rip), %rax     # 0x5df70
cmpb $0x0, (%rax)
je 0xb933
incl 0x8(%rbx)
jmp 0xb937
lock
incl 0x8(%rbx)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r13, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0xa7b8
movq %rax, %r14
testq %rbx, %rbx
je 0xb95d
movq %rbx, %rdi
callq 0x123fc
movq 0xd8(%r15), %rdi
addq $-0x18, %rdi
movq %rdi, 0xd8(%r15)
callq 0xbb18
jmp 0xb9d6
lock
incl 0x8(%rbx)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r15, %r8
callq 0xa7b8
movq %rax, %r14
testq %rbx, %rbx
je 0xb99a
movq %rbx, %rdi
callq 0x123fc
movq 0xd8(%r15), %rdi
addq $-0x18, %rdi
movq %rdi, 0xd8(%r15)
callq 0xbb18
leaq -0x90(%rbp), %rdi
callq 0xbb18
leaq 0x510a4(%rip), %rax     # 0x5ca68
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0xb9d6
callq 0x123fc
movb %r12b, 0x288(%r15)
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
testq %rbx, %rbx
je 0xba02
movq %rbx, %rdi
callq 0x123fc
movq -0x38(%rbp), %rax
movq 0xd8(%rax), %rdi
addq $-0x18, %rdi
movq %rdi, 0xd8(%rax)
callq 0xbb18
jmp 0xba87
movq %rax, %r14
jmp 0xba87
movb %r12b, -0x29(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, %r14
testq %rbx, %rbx
je 0xba3c
movq %rbx, %rdi
callq 0x123fc
movq -0x38(%rbp), %rax
movq 0xd8(%rax), %rdi
addq $-0x18, %rdi
movq %rdi, 0xd8(%rax)
jmp 0xba63
movb %r12b, -0x29(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0xbb18
jmp 0xbaac
movb %r12b, -0x29(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, %r14
jmp 0xbaac
movq %rax, %r14
testq %rbx, %rbx
je 0xba87
movq %rbx, %rdi
callq 0x123fc
leaq -0x90(%rbp), %rdi
callq 0xbb18
leaq 0x50fce(%rip), %rax     # 0x5ca68
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0xbaac
callq 0x123fc
movq -0x38(%rbp), %rax
movb -0x29(%rbp), %cl
movb %cl, 0x288(%rax)
movq %r14, %rdi
callq 0x8420
nop