// File: /workspace/github_cpp_makefile_star2_O2/yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::ReferenceChecker::visit(peg::Reference&)
inline void ReferenceChecker::visit(Reference &ope) {
  auto it = std::find(params_.begin(), params_.end(), ope.name_);
  if (it != params_.end()) { return; }

  if (!grammar_.count(ope.name_)) {
    error_s[ope.name_] = ope.s_;
    error_message[ope.name_] = "'" + ope.name_ + "' is not defined.";
  } else {
    if (!referenced.count(ope.name_)) { referenced.insert(ope.name_); }
    const auto &rule = grammar_.at(ope.name_);
    if (rule.is_macro) {
      if (!ope.is_macro_ || ope.args_.size() != rule.params.size()) {
        error_s[ope.name_] = ope.s_;
        error_message[ope.name_] = "incorrect number of arguments.";
      }
    } else if (ope.is_macro_) {
      error_s[ope.name_] = ope.s_;
      error_message[ope.name_] = "'" + ope.name_ + "' is not macro.";
    }
    for (auto arg : ope.args_) {
      arg->accept(*this);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0xb8(%rdi), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x20(%r14), %r15
movq %r15, %rdx
callq 0x35855
movq 0xb8(%rbx), %rcx
cmpq 0x8(%rcx), %rax
je 0xcc95
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb0(%rbx), %rdi
movq %r15, %rsi
callq 0x3594a
testq %rax, %rax
je 0xcd4a
leaq 0x78(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x35250
testq %rax, %rax
jne 0xcccc
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f826
movq 0xb0(%rbx), %rdi
movq %r15, %rsi
callq 0x36256
movb 0x48(%r14), %cl
cmpb $0x1, 0xe9(%rax)
jne 0xcdba
testb %cl, %cl
je 0xcd17
movq 0x58(%r14), %rcx
subq 0x50(%r14), %rcx
sarq $0x4, %rcx
movq 0xf8(%rax), %rdx
subq 0xf0(%rax), %rdx
sarq $0x5, %rdx
cmpq %rdx, %rcx
je 0xce26
movq 0x40(%r14), %r12
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x3598e
movq %r12, (%rax)
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0x35dec
leaq 0x2c51b(%rip), %rsi     # 0x39258
movq %rax, %rdi
callq 0x94a0
jmp 0xce26
movq 0x40(%r14), %r14
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x3598e
movq %r14, (%rax)
leaq 0x2ca09(%rip), %rsi     # 0x3976d
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %r15, %rdx
callq 0xbd74
leaq 0x2c4cc(%rip), %rdx     # 0x39246
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0xbd4b
addq $0x40, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x35dec
leaq -0x48(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x9310
movq %rbx, %rdi
callq 0x9140
leaq -0x68(%rbp), %rdi
callq 0x9140
jmp 0xcc86
testb %cl, %cl
je 0xce26
movq 0x40(%r14), %r12
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x3598e
movq %r12, (%rax)
leaq 0x2c995(%rip), %rsi     # 0x3976d
leaq -0x68(%rbp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0xbd74
leaq 0x2c489(%rip), %rdx     # 0x39277
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq 0xbd4b
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0x35dec
leaq -0x48(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x9310
movq %r15, %rdi
callq 0x9140
leaq -0x68(%rbp), %rdi
callq 0x9140
movq 0x50(%r14), %r15
movq 0x58(%r14), %r13
leaq -0x40(%rbp), %r14
leaq -0x48(%rbp), %r12
cmpq %r13, %r15
je 0xcc86
movq %r12, %rdi
movq %r15, %rsi
callq 0x117ce
movq -0x48(%rbp), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %r14, %rdi
callq 0x1106c
addq $0x10, %r15
jmp 0xce36
jmp 0xce69
jmp 0xce77
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x9140
jmp 0xce7a
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x9140
jmp 0xce90
movq %rax, %rbx
movq %r14, %rdi
callq 0x1106c
movq %rbx, %rdi
callq 0x9430