// File: yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::PrecedenceClimbing::parse_expression(char const*, unsigned long, peg::SemanticValues&, peg::Context&, std::any&, unsigned long) const
inline size_t PrecedenceClimbing::parse_expression(const char *s, size_t n,
                                                   SemanticValues &vs,
                                                   Context &c, std::any &dt,
                                                   size_t min_prec) const {
  auto len = atom_->parse(s, n, vs, c, dt);
  if (fail(len)) { return len; }

  std::string tok;
  auto &rule = get_reference_for_binop(c);
  auto action = std::move(rule.action);

  rule.action = [&](SemanticValues &vs2, std::any &dt2) {
    tok = vs2.token();
    if (action) {
      return action(vs2, dt2);
    } else if (!vs2.empty()) {
      return vs2[0];
    }
    return std::any();
  };
  auto action_se = scope_exit([&]() { rule.action = std::move(action); });

  auto i = len;
  while (i < n) {
    std::vector<std::any> save_values(vs.begin(), vs.end());
    auto save_tokens = vs.tokens;

    auto chvs = c.push_semantic_values_scope();
    auto chlen = binop_->parse(s + i, n - i, chvs, c, dt);
    c.pop_semantic_values_scope();

    if (fail(chlen)) { break; }

    auto it = info_.find(tok);
    if (it == info_.end()) { break; }

    auto level = std::get<0>(it->second);
    auto assoc = std::get<1>(it->second);

    if (level < min_prec) { break; }

    vs.emplace_back(std::move(chvs[0]));
    i += chlen;

    auto next_min_prec = level;
    if (assoc == 'L') { next_min_prec = level + 1; }

    chvs = c.push_semantic_values_scope();
    chlen = parse_expression(s + i, n - i, chvs, c, dt, next_min_prec);
    c.pop_semantic_values_scope();

    if (fail(chlen)) {
      vs.assign(save_values.begin(), save_values.end());
      vs.tokens = save_tokens;
      i = chlen;
      break;
    }

    vs.emplace_back(std::move(chvs[0]));
    i += chlen;

    std::any val;
    if (rule_.action) {
      vs.sv_ = std::string_view(s, i);
      val = rule_.action(vs, dt);
    } else if (!vs.empty()) {
      val = vs[0];
    }
    vs.clear();
    vs.emplace_back(std::move(val));
  }

  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp            # imm = 0x2D0
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x250(%rbp)
addq $0x8, %rdi
callq 0xded0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0xdaf0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xdbd0
testb $0x1, %al
jne 0x8a44a
jmp 0x8a457
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8ab49
leaq -0x60(%rbp), %rdi
callq 0xa520
movq -0x250(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x8ab60
movq %rax, -0x258(%rbp)
jmp 0x8a479
movq -0x258(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rsi
addq $0x60, %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x8acb0
movq -0x260(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0xa8(%rbp)
movq %rax, -0xa0(%rbp)
movq -0x68(%rbp), %rdi
addq $0x60, %rdi
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x8ace0
jmp 0x8a4d5
movq -0x68(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x8ad40
jmp 0x8a503
movq -0x40(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x8aaee
movq -0x28(%rbp), %rdi
callq 0x87d60
movq %rax, -0xf8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x87d90
movq %rax, -0x100(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x8ad70
movq -0x268(%rbp), %rcx
movq -0xf8(%rbp), %rsi
movq -0x100(%rbp), %rdx
leaq -0xf0(%rbp), %rdi
callq 0x8ad90
jmp 0x8a575
leaq -0x101(%rbp), %rdi
callq 0x8ae10
movq -0x28(%rbp), %rsi
addq $0x40, %rsi
leaq -0x120(%rbp), %rdi
callq 0x72800
jmp 0x8a597
movq -0x30(%rbp), %rdi
callq 0x862c0
movq %rax, -0x270(%rbp)
jmp 0x8a5a9
movq -0x270(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0x8ae30
jmp 0x8a5be
movq -0x250(%rbp), %rdi
addq $0x18, %rdi
callq 0xded0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0xd8(%rbp), %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
subq %rax, %rdx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
leaq -0x1c0(%rbp), %rcx
callq 0xdaf0
movq %rax, -0x278(%rbp)
jmp 0x8a603
movq -0x278(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x30(%rbp), %rdi
callq 0x880b0
movq -0x1c8(%rbp), %rdi
callq 0xdbd0
testb $0x1, %al
jne 0x8a62f
jmp 0x8a6b0
movl $0x3, -0x1cc(%rbp)
jmp 0x8aa91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x8ab3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x8ab32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x101(%rbp), %rdi
callq 0x8ae10
jmp 0x8ab26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x8aae0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x8aad4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x8aac8
movq -0x250(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x288(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xa420
movq -0x288(%rbp), %rdi
movq %rax, -0x1e8(%rbp)
movq %rdx, -0x1e0(%rbp)
leaq -0x1e8(%rbp), %rsi
callq 0x8af20
movq %rax, -0x280(%rbp)
jmp 0x8a6f5
movq -0x250(%rbp), %rdi
movq -0x280(%rbp), %rax
movq %rax, -0x1d8(%rbp)
addq $0x28, %rdi
callq 0x8af80
movq %rax, -0x1f0(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x8af50
testb $0x1, %al
jne 0x8a733
jmp 0x8a742
movl $0x3, -0x1cc(%rbp)
jmp 0x8aa91
leaq -0x1d8(%rbp), %rdi
callq 0x8afd0
movq %rax, %rdi
addq $0x10, %rdi
callq 0x8afb0
movq (%rax), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x8afd0
movq %rax, %rdi
addq $0x10, %rdi
callq 0x8aff0
movb (%rax), %al
movb %al, -0x1f9(%rbp)
movq -0x1f8(%rbp), %rax
cmpq 0x10(%rbp), %rax
jae 0x8a7a0
movl $0x3, -0x1cc(%rbp)
jmp 0x8aa91
movq -0x28(%rbp), %rax
movq %rax, -0x290(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x1c0(%rbp), %rdi
callq 0x8b010
movq -0x290(%rbp), %rdi
movq %rax, %rsi
callq 0xf0c0
jmp 0x8a7cc
movq -0x1c8(%rbp), %rax
addq -0xd8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x208(%rbp)
movsbl -0x1f9(%rbp), %eax
cmpl $0x4c, %eax
jne 0x8a80d
movq -0x1f8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x208(%rbp)
movq -0x30(%rbp), %rdi
callq 0x862c0
movq %rax, -0x298(%rbp)
jmp 0x8a81f
movq -0x298(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0x8b030
jmp 0x8a834
movq -0x250(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0xd8(%rbp), %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
subq %rax, %rdx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x208(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
leaq -0x1c0(%rbp), %rcx
callq 0x8a3e0
movq %rax, -0x2a0(%rbp)
jmp 0x8a87a
movq -0x2a0(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x30(%rbp), %rdi
callq 0x880b0
movq -0x1c8(%rbp), %rdi
callq 0xdbd0
testb $0x1, %al
jne 0x8a8a6
jmp 0x8a92d
movq -0x28(%rbp), %rax
movq %rax, -0x2a8(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x87d60
movq -0x2b0(%rbp), %rdi
movq %rax, -0x210(%rbp)
callq 0x87d90
movq -0x2a8(%rbp), %rdi
movq %rax, -0x218(%rbp)
movq -0x210(%rbp), %rsi
movq -0x218(%rbp), %rdx
callq 0x8b0d0
jmp 0x8a8fa
movq -0x28(%rbp), %rdi
addq $0x40, %rdi
leaq -0x120(%rbp), %rsi
callq 0x8b110
jmp 0x8a910
movq -0x1c8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x3, -0x1cc(%rbp)
jmp 0x8aa91
movq -0x28(%rbp), %rax
movq %rax, -0x2b8(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x1c0(%rbp), %rdi
callq 0x8b010
movq -0x2b8(%rbp), %rdi
movq %rax, %rsi
callq 0xf0c0
jmp 0x8a959
movq -0x1c8(%rbp), %rcx
movq -0xd8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0xd8(%rbp)
leaq -0x228(%rbp), %rdi
callq 0xda70
movq -0x250(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0x60, %rdi
callq 0x8b360
movb %al, -0x2b9(%rbp)
jmp 0x8a999
movb -0x2b9(%rbp), %al
testb $0x1, %al
jne 0x8a9a8
jmp 0x8aa31
movq -0x18(%rbp), %rsi
movq -0xd8(%rbp), %rdx
leaq -0x238(%rbp), %rdi
callq 0xea40
movq -0x250(%rbp), %rax
movq -0x28(%rbp), %rcx
movups -0x238(%rbp), %xmm0
movups %xmm0, 0x60(%rcx)
movq 0x58(%rax), %rsi
addq $0x60, %rsi
movq -0x28(%rbp), %rdx
movq -0x38(%rbp), %rcx
leaq -0x248(%rbp), %rdi
callq 0x8b380
jmp 0x8a9f3
leaq -0x228(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x73f70
leaq -0x248(%rbp), %rdi
callq 0xd9f0
jmp 0x8aa60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x228(%rbp), %rdi
callq 0xd9f0
jmp 0x8aac8
movq -0x28(%rbp), %rdi
callq 0x57130
testb $0x1, %al
jne 0x8aa5e
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8b010
movq %rax, %rsi
leaq -0x228(%rbp), %rdi
callq 0x8b3c0
jmp 0x8aa5c
jmp 0x8aa5e
jmp 0x8aa60
movq -0x28(%rbp), %rdi
callq 0x867e0
movq -0x28(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0xf0c0
jmp 0x8aa7b
leaq -0x228(%rbp), %rdi
callq 0xd9f0
movl $0x0, -0x1cc(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0xde10
leaq -0x120(%rbp), %rdi
callq 0x1f040
leaq -0xf0(%rbp), %rdi
callq 0x8b410
movl -0x1cc(%rbp), %eax
testl %eax, %eax
je 0x8aac3
jmp 0x8aac1
jmp 0x8aaee
jmp 0x8a50e
leaq -0x1c0(%rbp), %rdi
callq 0xde10
leaq -0x120(%rbp), %rdi
callq 0x1f040
leaq -0xf0(%rbp), %rdi
callq 0x8b410
jmp 0x8ab26
movq -0xd8(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x1cc(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x8b470
leaq -0x98(%rbp), %rdi
callq 0x3c7c0
leaq -0x60(%rbp), %rdi
callq 0xa250
jmp 0x8ab49
leaq -0xc0(%rbp), %rdi
callq 0x8b470
leaq -0x98(%rbp), %rdi
callq 0x3c7c0
leaq -0x60(%rbp), %rdi
callq 0xa250
jmp 0x8ab56
movq -0x8(%rbp), %rax
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0xa650
nop