// File: /workspace/github_cpp_makefile_star2_O3/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 $0xa8, %rsp
movq %rsi, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
cmpq $0x0, 0x8(%rdi)
je 0xb4a1
movq %r9, %r13
movq %r8, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x18(%rdi), %rax
movq %rax, -0x38(%rbp)
movq 0x18(%rdi), %rax
cmpb $0x1, 0xe9(%rax)
jne 0xb33b
movq %rdx, %rbx
movq 0xc0(%r15), %rsi
cmpq 0xc8(%r15), %rsi
je 0xb406
movq %rax, (%rsi)
addq $0x8, 0xc0(%r15)
jmp 0xb41e
movq %rcx, -0x30(%rbp)
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r8
movaps %xmm0, (%r8)
movq 0x58(%rax), %rdx
movq %r14, -0xa0(%rbp)
movq %r15, -0x98(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %r13, -0x80(%rbp)
leaq -0x48(%rbp), %rcx
movq %rcx, -0x78(%rbp)
movups -0xa0(%rbp), %xmm0
movups -0x90(%rbp), %xmm1
movups -0x80(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xb4fe
movq -0x48(%rbp), %rbx
cmpq $-0x1, %rbx
je 0xb43d
movq -0x38(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0xc0(%rax)
jne 0xb476
leaq -0x60(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0xb6e4
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xb446
movq (%rax), %rdx
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edi
shll $0x5, %edi
addl %eax, %edi
movzbl (%rdx,%rsi), %eax
xorl %edi, %eax
incq %rsi
cmpq %rsi, %rcx
jne 0xb3ef
jmp 0xb448
leaq 0xb8(%r15), %rdi
movq -0x38(%rbp), %rdx
movq %rcx, -0x30(%rbp)
callq 0x3d188
movq -0x30(%rbp), %rcx
movq 0x8(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r15, %r8
movq %r13, %r9
callq 0xa7b8
addq $-0x8, 0xc0(%r15)
jmp 0xb48f
movq $-0x1, %rbx
jmp 0xb476
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rdi
movq 0x30(%rdi), %rsi
cmpq 0x38(%rdi), %rsi
je 0xb465
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x30(%rdi)
jmp 0xb472
addq $0x28, %rdi
leaq -0x3c(%rbp), %rdx
callq 0x3cc72
movq -0x48(%rbp), %rbx
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0xb48c
leaq -0x60(%rbp), %rsi
movl $0x3, %edi
xorl %edx, %edx
callq *%rax
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x8150
movq %rax, %r14
leaq 0x36d47(%rip), %rsi     # 0x421fc
movq %rax, %rdi
callq 0x8360
movq 0x52aec(%rip), %rsi     # 0x5dfb0
movq 0x52a9d(%rip), %rdx     # 0x5df68
movq %r14, %rdi
callq 0x8400
jmp 0xb4ea
movq %rax, %rdi
callq 0xe032
movq %rax, %rbx
movq %r14, %rdi
callq 0x8220
jmp 0xb4f6
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0xa784
movq %rbx, %rdi
callq 0x8420