// File: /workspace/github_cpp_makefile_star2_O2/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 $0xb8, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r13
movb 0x288(%r8), %r12b
movq 0x68(%rdi), %rax
testq %rax, %rax
je 0xb8b8
cmpb $0x1, 0xc0(%rax)
jne 0xb7e1
movb 0x240(%r15), %cl
xorb $0x1, %cl
movb %cl, 0x288(%r15)
movq %rdx, -0x60(%rbp)
leaq 0xd0(%r15), %rcx
cmpb $0x1, 0xe9(%rax)
movq %rsi, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
jne 0xb8e5
movq %rcx, -0xc8(%rbp)
movq %r13, -0xb8(%rbp)
movq %r14, -0xc0(%rbp)
movb %r12b, -0x29(%rbp)
movq 0xc0(%r15), %rax
movq %r15, -0x38(%rbp)
movq 0xd8(%r15), %rcx
addq $-0x18, %rcx
movl $0xf0, %edx
addq -0x8(%rax), %rdx
leaq 0x501f0(%rip), %rax     # 0x5ba30
leaq -0xa8(%rbp), %rsi
movq %rax, -0x8(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq %rcx, 0x10(%rsi)
movq %rdx, 0x18(%rsi)
leaq -0x80(%rbp), %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movq 0x50(%rdi), %rbx
movq 0x58(%rdi), %r12
leaq -0x48(%rbp), %r14
leaq -0xb0(%rbp), %r13
cmpq %r12, %rbx
je 0xb95b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x117ce
movq -0x48(%rbp), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *0x18(%rax)
movq %r15, %rdi
leaq -0xa8(%rbp), %rsi
callq 0xba96
leaq -0x40(%rbp), %rdi
callq 0x1106c
addq $0x10, %rbx
jmp 0xb879
movq 0xd8(%r15), %rax
movq 0x70(%rdi), %rcx
movq -0x18(%rax), %rax
shlq $0x4, %rcx
movq (%rax,%rcx), %rdi
movq %r13, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0xabc8
movq %rax, %r14
jmp 0xb9dc
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %rcx, %rdi
callq 0x1180c
leaq -0xb0(%rbp), %rbx
movq %rbx, %rdi
callq 0xbb2a
movq %r15, (%rbx)
movb $0x1, 0x8(%rbx)
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
callq 0xbaec
movq (%rbx), %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r13, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0xabc8
movq %rax, %r14
leaq -0x78(%rbp), %rdi
callq 0x1106c
leaq -0xb0(%rbp), %rdi
callq 0xbb6e
jmp 0xb9dc
leaq -0x80(%rbp), %rsi
movq -0xc8(%rbp), %rdi
callq 0x1180c
movq -0x38(%rbp), %r15
movq %r15, -0x48(%rbp)
movb $0x1, -0x40(%rbp)
leaq -0xd8(%rbp), %rbx
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
callq 0xbaec
movq (%rbx), %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0xb8(%rbp), %rcx
movq %r15, %r8
movq -0xc0(%rbp), %r9
movb -0x29(%rbp), %r12b
callq 0xabc8
movq %rax, %r14
leaq -0xd0(%rbp), %rdi
callq 0x1106c
leaq -0x48(%rbp), %rdi
callq 0xbb10
leaq -0x80(%rbp), %rdi
callq 0xbb2a
leaq -0xb0(%rbp), %rdi
callq 0xbb56
movb %r12b, 0x288(%r15)
movq %r14, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0xd0(%rbp), %rdi
callq 0x1106c
leaq -0x48(%rbp), %rdi
callq 0xbb10
jmp 0xba6b
movq %rax, %r14
jmp 0xba6b
movb %r12b, -0x29(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, %r14
leaq -0x78(%rbp), %rdi
callq 0x1106c
leaq -0xb0(%rbp), %rdi
callq 0xbb6e
jmp 0xba80
movb %r12b, -0x29(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
callq 0xbb2a
jmp 0xba80
movb %r12b, -0x29(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, %r14
jmp 0xba80
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x1106c
leaq -0x80(%rbp), %rdi
callq 0xbb2a
leaq -0xb0(%rbp), %rdi
callq 0xbb56
movq -0x38(%rbp), %rax
movb -0x29(%rbp), %cl
movb %cl, 0x288(%rax)
movq %r14, %rdi
callq 0x9430
nop