// File: /workspace/github_cpp_makefile_star2_O1/yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::Holder::parse_core(char const*, unsigned long, peg::SemanticValues&, peg::Context&, std::any&) const
inline size_t Holder::parse_core(const char *s, size_t n, SemanticValues &vs,
                                 Context &c, std::any &dt) const {
  if (!ope_) {
    throw std::logic_error("Uninitialized definition ope was used...");
  }

  // Macro reference
  if (outer_->is_macro) {
    c.rule_stack.push_back(outer_);
    auto len = ope_->parse(s, n, vs, c, dt);
    c.rule_stack.pop_back();
    return len;
  }

  size_t len;
  std::any val;

  c.packrat(s, outer_->id, len, val, [&](std::any &a_val) {
    if (outer_->enter) { outer_->enter(c, s, n, dt); }
    auto &chvs = c.push_semantic_values_scope();
    auto se = scope_exit([&]() {
      c.pop_semantic_values_scope();
      if (outer_->leave) { outer_->leave(c, s, n, len, a_val, dt); }
    });

    c.rule_stack.push_back(outer_);
    len = ope_->parse(s, n, chvs, c, dt);
    c.rule_stack.pop_back();

    // Invoke action
    if (success(len)) {
      chvs.sv_ = std::string_view(s, len);
      chvs.name_ = outer_->name;

      auto ope_ptr = ope_.get();
      {
        auto tok_ptr = dynamic_cast<const peg::TokenBoundary *>(ope_ptr);
        if (tok_ptr) { ope_ptr = tok_ptr->ope_.get(); }
      }
      if (!dynamic_cast<const peg::PrioritizedChoice *>(ope_ptr) &&
          !dynamic_cast<const peg::Dictionary *>(ope_ptr)) {
        chvs.choice_count_ = 0;
        chvs.choice_ = 0;
      }

      std::string msg;
      if (outer_->predicate && !outer_->predicate(chvs, dt, msg)) {
        if (c.log && !msg.empty() && c.error_info.message_pos < s) {
          c.error_info.message_pos = s;
          c.error_info.message = msg;
          c.error_info.label = outer_->name;
        }
        len = static_cast<size_t>(-1);
      }

      if (success(len)) {
        if (!c.recovered) { a_val = reduce(chvs, dt); }
      } else {
        if (c.log && !msg.empty() && c.error_info.message_pos < s) {
          c.error_info.message_pos = s;
          c.error_info.message = msg;
          c.error_info.label = outer_->name;
        }
      }
    } else {
      if (c.log && !outer_->error_message.empty() &&
          c.error_info.message_pos < s) {
        c.error_info.message_pos = s;
        c.error_info.message = outer_->error_message;
        c.error_info.label = outer_->name;
      }
    }
  });

  if (success(len)) {
    if (!outer_->ignoreSemanticValue) {
      vs.emplace_back(std::move(val));
      vs.tags.emplace_back(str2tag(outer_->name));
    }
  }

  return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
cmpq $0x0, 0x8(%rdi)
je 0xc468
movq %r9, %r12
movq %r8, %r14
movq %rcx, %rbx
movq %rdi, %r13
leaq 0x18(%rdi), %r15
movq 0x18(%rdi), %rax
cmpb $0x1, 0xe9(%rax)
jne 0xc346
movq 0xc0(%r14), %rsi
cmpq 0xc8(%r14), %rsi
je 0xc3ee
movq %rax, (%rsi)
addq $0x8, 0xc0(%r14)
jmp 0xc3fd
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %r8
movaps %xmm0, (%r8)
movq 0x58(%rax), %rdx
movq %r13, -0x88(%rbp)
movq %r14, -0x80(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %r12, -0x68(%rbp)
leaq -0x48(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movups -0x88(%rbp), %xmm0
movups -0x78(%rbp), %xmm1
movups -0x68(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0xc4c6
cmpq $-0x1, -0x48(%rbp)
je 0xc431
movq (%r15), %rax
cmpb $0x0, 0xc0(%rax)
jne 0xc431
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xc6b4
movq (%r15), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x13bbc
movl %eax, -0x2c(%rbp)
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0xc421
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x30(%rbx)
jmp 0xc431
leaq 0xb8(%r14), %rdi
movq %r15, %rdx
callq 0x3f27c
movq 0x8(%r13), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %rbx, %rcx
movq %r14, %r8
movq %r12, %r9
callq 0xb7ee
addq $-0x8, 0xc0(%r14)
jmp 0xc456
addq $0x28, %rbx
leaq -0x2c(%rbp), %rdx
movq %rbx, %rdi
callq 0x3ed30
movq -0x48(%rbp), %rbx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc453
leaq -0x40(%rbp), %rsi
movl $0x3, %edi
xorl %edx, %edx
callq *%rax
movq $0x0, -0x40(%rbp)
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x9150
movq %rax, %r14
leaq 0x37d80(%rip), %rsi     # 0x441fc
movq %rax, %rdi
callq 0x9360
movq 0x53b25(%rip), %rsi     # 0x5ffb0
movq 0x53ad6(%rip), %rdx     # 0x5ff68
movq %r14, %rdi
callq 0x9400
jmp 0xc4b1
movq %rax, %rdi
callq 0xf084
movq %rax, %rbx
movq %r14, %rdi
callq 0x9220
jmp 0xc4bd
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0xb7ba
movq %rbx, %rdi
callq 0x9420
nop