// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %r13
movq 0x8(%rdi), %rdi
movq %rsi, -0x70(%rbp)
movq %rdx, -0x80(%rbp)
callq 0xa7b8
movq %rax, -0x40(%rbp)
cmpq $-0x1, %rax
je 0x3b4a8
movq %r15, -0x30(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r13, %rdi
movq %r14, %rsi
callq 0x3b59e
movq %rax, %r12
movq %r13, %r15
leaq 0x60(%rax), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movq $0x0, -0x90(%rbp)
movq 0x78(%rax), %rax
movq %rax, -0x88(%rbp)
movq 0x70(%r12), %rax
testq %rax, %rax
je 0x3b07d
movq %r12, %rcx
addq $0x70, %rcx
movups (%rdi), %xmm1
movaps %xmm1, -0xa0(%rbp)
movq %rax, -0x90(%rbp)
movups %xmm0, (%rcx)
leaq -0xc0(%rbp), %rsi
leaq -0xa0(%rbp), %r13
movq %r13, %rdx
callq 0x3b686
movq %r12, -0x118(%rbp)
movq %r13, -0x110(%rbp)
movb $0x1, -0x108(%rbp)
movq -0x30(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x78(%rbp)
leaq 0x28(%r15), %rax
movq %rax, -0xd0(%rbp)
leaq 0x30(%r15), %rax
movq %rax, -0xc8(%rbp)
leaq -0x1b8(%rbp), %r13
movq %rbx, -0x68(%rbp)
movq %r14, -0x38(%rbp)
movq %r15, -0x48(%rbp)
movq -0x80(%rbp), %r12
subq -0x40(%rbp), %r12
jbe 0x3b457
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x100(%rbp), %rdi
movq %r13, %rcx
callq 0x3b6de
leaq -0xe8(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x357ee
movq %r14, %rdi
callq 0x3a5ca
movq %r13, %rdi
movq %rax, %rsi
callq 0x3b720
movq 0x18(%r15), %rdi
movq -0x70(%rbp), %rax
movq -0x40(%rbp), %rcx
leaq (%rax,%rcx), %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0xa7b8
movq %rax, %r12
decq 0xb0(%r14)
cmpq $-0x1, %rax
je 0x3b19a
movq -0xc0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq %rax, -0x58(%rbp)
movq -0xd0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3be48
cmpq -0xc8(%rbp), %rax
je 0x3b19a
movq 0x30(%rax), %r15
cmpq 0x10(%rbp), %r15
jae 0x3b1a2
xorl %r12d, %r12d
jmp 0x3b3c3
xorl %r12d, %r12d
jmp 0x3b3c7
movb 0x38(%rax), %r14b
movq -0x1b8(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0xb6e4
xorl %ebx, %ebx
cmpb $0x4c, %r14b
sete %r14b
movq -0x38(%rbp), %rdi
callq 0x3a5ca
movq %rax, %r13
leaq -0x1b8(%rbp), %rdi
movq %rax, %rsi
callq 0x3bebc
movups 0x18(%r13), %xmm0
leaq -0x1a0(%rbp), %rax
movups %xmm0, (%rax)
leaq 0x28(%r13), %rsi
leaq -0x190(%rbp), %rdi
callq 0x3bffa
leaq 0x40(%r13), %rsi
leaq -0x178(%rbp), %rdi
callq 0x3b7f4
movq 0x78(%r13), %rax
leaq -0x1a0(%rbp), %rcx
movq %rax, 0x60(%rcx)
movups 0x58(%r13), %xmm0
movups 0x68(%r13), %xmm1
movups %xmm1, 0x50(%rcx)
movups %xmm0, 0x40(%rcx)
subq $-0x80, %r13
leaq -0x138(%rbp), %rdi
movq %r13, %rsi
callq 0x8170
addq -0x40(%rbp), %r12
movb %r14b, %bl
addq %rbx, %r15
movq -0x70(%rbp), %rax
leaq (%rax,%r12), %rsi
movq -0x80(%rbp), %rdx
subq %r12, %rdx
movq %r15, (%rsp)
movq -0x48(%rbp), %rdi
leaq -0x1b8(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x68(%rbp), %r9
callq 0x3afca
movq %rax, %rbx
movq -0x38(%rbp), %rax
decq 0xb0(%rax)
cmpq $-0x1, %rbx
je 0x3b327
movq -0x1b8(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0xb6e4
addq %r12, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movq -0x48(%rbp), %rcx
movq 0x58(%rcx), %rax
cmpq $0x0, 0x70(%rax)
movq %rbx, -0x40(%rbp)
je 0x3b36e
movq -0x30(%rbp), %r15
movq %rbx, 0x60(%r15)
movq -0x70(%rbp), %rax
movq %rax, 0x68(%r15)
movq 0x58(%rcx), %rax
cmpq $0x0, 0x70(%rax)
movq -0x38(%rbp), %r14
leaq -0x1b8(%rbp), %r13
leaq -0x1c8(%rbp), %r12
je 0x3b4c4
leaq 0x60(%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq -0x68(%rbp), %rbx
movq %rbx, %rcx
callq *0x78(%rax)
leaq -0x60(%rbp), %rdi
movq %r12, %rsi
callq 0x35c58
movq -0x1c8(%rbp), %rax
testq %rax, %rax
je 0x3b393
movl $0x3, %edi
movq %r12, %rsi
xorl %edx, %edx
callq *%rax
jmp 0x3b393
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
movq -0x30(%rbp), %rdi
callq 0x3c24c
movq -0x78(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x3b7f4
movq $-0x1, -0x40(%rbp)
xorl %r12d, %r12d
movq -0x68(%rbp), %rbx
movq -0x38(%rbp), %r14
movq -0x48(%rbp), %r15
leaq -0x1b8(%rbp), %r13
jmp 0x3b3c7
movq -0x30(%rbp), %r15
movq (%r15), %rsi
cmpq 0x8(%r15), %rsi
movq -0x68(%rbp), %rbx
movq -0x38(%rbp), %r14
leaq -0x1b8(%rbp), %r13
je 0x3b393
leaq -0x60(%rbp), %rdi
callq 0x3b8ee
movq (%r15), %rsi
movq %r15, %rdi
callq 0x3aad6
movq %r15, %rdi
leaq -0x60(%rbp), %rsi
callq 0xb6e4
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x3b3c0
movl $0x3, %edi
leaq -0x60(%rbp), %rsi
xorl %edx, %edx
callq *%rax
movb $0x1, %r12b
movq -0x48(%rbp), %r15
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x3b3e9
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x82b0
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0x3b404
movq -0x168(%rbp), %rsi
subq %rdi, %rsi
callq 0x82b0
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0x3b41f
movq -0x180(%rbp), %rsi
subq %rdi, %rsi
callq 0x82b0
movq %r13, %rdi
callq 0x3b960
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x3b442
movq -0xd8(%rbp), %rsi
subq %rdi, %rsi
callq 0x82b0
leaq -0x100(%rbp), %rdi
callq 0x3b960
testb %r12b, %r12b
jne 0x3b0dd
leaq -0x118(%rbp), %rdi
callq 0x3b99e
movq -0x90(%rbp), %rax
testq %rax, %rax
je 0x3b480
leaq -0xa0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
movq -0x40(%rbp), %rbx
je 0x3b4af
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x82b0
jmp 0x3b4af
movq $-0x1, %rbx
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x80f0
jmp 0x3b595
jmp 0x3b595
movq %rax, %rbx
jmp 0x3b54e
movq %rax, %rbx
jmp 0x3b56b
jmp 0x3b595
jmp 0x3b4e9
jmp 0x3b4e9
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0xa784
jmp 0x3b50a
jmp 0x3b507
jmp 0x3b507
movq %rax, %rbx
jmp 0x3b542
jmp 0x3b507
movq %rax, %rbx
jmp 0x3b536
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0xabbc
jmp 0x3b51b
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x3b536
movq -0xd8(%rbp), %rsi
subq %rdi, %rsi
callq 0x82b0
leaq -0x100(%rbp), %rdi
callq 0x3b960
leaq -0x118(%rbp), %rdi
callq 0x3b99e
movq -0x90(%rbp), %rax
testq %rax, %rax
je 0x3b56b
leaq -0xa0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x3b58d
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x82b0
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0xe032
nop