// File: /workspace/github_cpp_makefile_star2_O2/yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::ParserGenerator::apply_precedence_instruction(peg::Definition&, std::map<std::basic_string_view<char, std::char_traits<char>>, std::pair<unsigned long, char>, std::less<std::basic_string_view<char, std::char_traits<char>>>, std::allocator<std::pair<std::basic_string_view<char, std::char_traits<char>> const, std::pair<unsigned long, char>>>> const&, char const*, std::function<void (unsigned long, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>)
bool apply_precedence_instruction(Definition &rule,
                                    const PrecedenceClimbing::BinOpeInfo &info,
                                    const char *s, Log log) {
    try {
      auto &seq = dynamic_cast<Sequence &>(*rule.get_core_operator());
      auto atom = seq.opes_[0];
      auto &rep = dynamic_cast<Repetition &>(*seq.opes_[1]);
      auto &seq1 = dynamic_cast<Sequence &>(*rep.ope_);
      auto binop = seq1.opes_[0];
      auto atom1 = seq1.opes_[1];

      auto atom_name = dynamic_cast<Reference &>(*atom).name_;
      auto binop_name = dynamic_cast<Reference &>(*binop).name_;
      auto atom1_name = dynamic_cast<Reference &>(*atom1).name_;

      if (!rep.is_zom() || atom_name != atom1_name || atom_name == binop_name) {
        if (log) {
          auto line = line_info(s, rule.s_);
          log(line.first, line.second,
              "'precedence' instruction cannot be applied to '" + rule.name +
                  "'.",
              "");
        }
        return false;
      }

      rule.holder_->ope_ = pre(atom, binop, info, rule);
      rule.disable_action = true;
    } catch (...) {
      if (log) {
        auto line = line_info(s, rule.s_);
        log(line.first, line.second,
            "'precedence' instruction cannot be applied to '" + rule.name +
                "'.",
            "");
      }
      return false;
    }
    return true;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, %rbx
movq %rcx, -0x38(%rbp)
movq %rdx, %r12
movq %rsi, %r14
leaq -0x58(%rbp), %r15
movq %r15, %rdi
callq 0x101ac
movq (%r15), %rdi
leaq 0x2c951(%rip), %rsi     # 0x5ace0
leaq 0x2c9d2(%rip), %rdx     # 0x5ad68
xorl %ecx, %ecx
callq 0x92f0
testq %rax, %rax
je 0x2e64d
movq %rax, %r13
leaq -0x50(%rbp), %rdi
callq 0x1106c
movq 0x8(%r13), %rsi
leaq -0x78(%rbp), %rdi
callq 0x117ce
movq 0x8(%r13), %rax
movq 0x10(%rax), %rdi
leaq 0x2c912(%rip), %rsi     # 0x5ace0
leaq 0x2ca23(%rip), %rdx     # 0x5adf8
xorl %ecx, %ecx
callq 0x92f0
testq %rax, %rax
je 0x2e652
movq %rax, %r13
movq 0x8(%rax), %rdi
leaq 0x2c8ed(%rip), %rsi     # 0x5ace0
leaq 0x2c96e(%rip), %rdx     # 0x5ad68
xorl %ecx, %ecx
callq 0x92f0
testq %rax, %rax
je 0x2e657
movq %rax, %r15
movq 0x8(%rax), %rsi
leaq -0x68(%rbp), %rdi
callq 0x117ce
movq 0x8(%r15), %rsi
addq $0x10, %rsi
leaq -0xe8(%rbp), %rdi
callq 0x117ce
movq -0x78(%rbp), %rdi
leaq 0x2c8a7(%rip), %rsi     # 0x5ace0
leaq 0x2c8c0(%rip), %rdx     # 0x5ad00
xorl %ecx, %ecx
callq 0x92f0
testq %rax, %rax
je 0x2e65c
addq $0x20, %rax
leaq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x9360
movq -0x68(%rbp), %rdi
leaq 0x2c875(%rip), %rsi     # 0x5ace0
leaq 0x2c88e(%rip), %rdx     # 0x5ad00
xorl %ecx, %ecx
callq 0x92f0
testq %rax, %rax
je 0x2e661
addq $0x20, %rax
leaq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x9360
movq -0xe8(%rbp), %rdi
leaq 0x2c83d(%rip), %rsi     # 0x5ace0
leaq 0x2c856(%rip), %rdx     # 0x5ad00
xorl %ecx, %ecx
callq 0x92f0
testq %rax, %rax
je 0x2e666
addq $0x20, %rax
leaq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x9360
cmpq $0x0, 0x18(%r13)
jne 0x2e507
cmpq $-0x1, 0x20(%r13)
jne 0x2e507
leaq -0x58(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3006b
testb %al, %al
jne 0x2e507
leaq -0x58(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0xc942
testb %al, %al
je 0x2e601
cmpq $0x0, 0x10(%rbx)
je 0x2e5ac
movq 0x20(%r14), %rsi
movq -0x38(%rbp), %rdi
callq 0x11bfa
movq %rax, %r12
movq %rdx, %r13
leaq 0xb9a5(%rip), %rsi      # 0x39ed1
leaq -0x128(%rbp), %rdi
movq %r14, %rdx
callq 0xbd74
leaq 0xb91b(%rip), %rdx      # 0x39e5d
leaq -0x98(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xbd4b
leaq 0xb47e(%rip), %rsi      # 0x399da
leaq -0x108(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0xff44
leaq -0x98(%rbp), %rcx
leaq -0x108(%rbp), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x11e10
leaq -0x108(%rbp), %rdi
callq 0x9140
leaq -0x98(%rbp), %rdi
callq 0x9140
leaq -0x128(%rbp), %rdi
callq 0x9140
xorl %ebx, %ebx
leaq -0xb8(%rbp), %rdi
callq 0x9140
leaq -0xd8(%rbp), %rdi
callq 0x9140
leaq -0x58(%rbp), %rdi
callq 0x9140
leaq -0xe0(%rbp), %rdi
callq 0x1106c
leaq -0x60(%rbp), %rdi
callq 0x1106c
leaq -0x70(%rbp), %rdi
callq 0x1106c
movl %ebx, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x98(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x68(%rbp), %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x30078
movq 0x1c0(%r14), %rdi
addq $0x8, %rdi
leaq -0x98(%rbp), %rsi
callq 0x24c72
leaq -0x90(%rbp), %rdi
callq 0x1106c
movb $0x1, 0x108(%r14)
movb $0x1, %bl
jmp 0x2e5ae
callq 0x9480
callq 0x9480
callq 0x9480
callq 0x9480
callq 0x9480
callq 0x9480
jmp 0x2e6a2
movq %rax, %r12
leaq -0x108(%rbp), %rdi
callq 0x9140
jmp 0x2e681
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0x9140
jmp 0x2e692
movq %rax, %r12
leaq -0x128(%rbp), %rdi
callq 0x9140
jmp 0x2e6a5
jmp 0x2e6a2
movq %rax, %r12
leaq -0xb8(%rbp), %rdi
callq 0x9140
jmp 0x2e6c6
jmp 0x2e6b5
movq %rax, %r12
jmp 0x2e6fa
movq %rax, %r12
leaq -0x50(%rbp), %rdi
jmp 0x2e6fe
movq %rax, %r12
leaq -0xd8(%rbp), %rdi
callq 0x9140
jmp 0x2e6d7
movq %rax, %r12
leaq -0x58(%rbp), %rdi
callq 0x9140
jmp 0x2e6e5
movq %rax, %r12
leaq -0xe0(%rbp), %rdi
callq 0x1106c
leaq -0x60(%rbp), %rdi
callq 0x1106c
leaq -0x70(%rbp), %rdi
callq 0x1106c
movq %r12, %rdi
callq 0x9110
cmpq $0x0, 0x10(%rbx)
je 0x2e7aa
movq 0x20(%r14), %rsi
movq -0x38(%rbp), %rdi
callq 0x11bfa
movq %rax, %r15
movq %rdx, %r12
leaq 0xb7a1(%rip), %rsi      # 0x39ed1
leaq -0xd8(%rbp), %rdi
movq %r14, %rdx
callq 0xbd74
leaq 0xb717(%rip), %rdx      # 0x39e5d
leaq -0x58(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0xbd4b
leaq 0xb27d(%rip), %rsi      # 0x399da
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0xff44
leaq -0x58(%rbp), %rcx
leaq -0xb8(%rbp), %r8
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x11e10
leaq -0xb8(%rbp), %rdi
callq 0x9140
leaq -0x58(%rbp), %rdi
callq 0x9140
leaq -0xd8(%rbp), %rdi
callq 0x9140
callq 0x9410
xorl %ebx, %ebx
jmp 0x2e5ed
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x9140
jmp 0x2e7ca
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x9140
jmp 0x2e7d8
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x9140
jmp 0x2e7eb
jmp 0x2e7e8
movq %rax, %rbx
callq 0x9410
movq %rbx, %rdi
callq 0x9430
movq %rax, %rdi
callq 0xd6c3