// File: yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::Context::set_error_pos(char const*, char const*)
inline void Context::set_error_pos(const char *a_s, const char *literal) {
  if (log) {
    if (error_info.error_pos <= a_s) {
      if (error_info.error_pos < a_s || !error_info.keep_previous_token) {
        error_info.error_pos = a_s;
        error_info.expected_tokens.clear();
      }

      const char *error_literal = nullptr;
      const Definition *error_rule = nullptr;

      if (literal) {
        error_literal = literal;
      } else if (!rule_stack.empty()) {
        auto rule = rule_stack.back();
        auto ope = rule->get_core_operator();
        if (auto token = FindLiteralToken::token(*ope);
            token && token[0] != '\0') {
          error_literal = token;
        }
      }

      for (auto r : rule_stack) {
        error_rule = r;
        if (r->is_token()) { break; }
      }

      if (error_literal || error_rule) {
        error_info.add(error_literal, error_rule);
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
addq $0x248, %rdi            # imm = 0x248
callq 0x104e0
testb $0x1, %al
jne 0xd084
jmp 0xd233
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
ja 0xd231
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jb 0xd0b1
movq -0x80(%rbp), %rax
testb $0x1, 0x88(%rax)
jne 0xd0ca
movq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, 0x18(%rdi)
addq $0x18, %rdi
addq $0x8, %rdi
callq 0x196c0
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xd0ee
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xd19b
movq -0x80(%rbp), %rdi
addq $0xb8, %rdi
callq 0x196e0
testb $0x1, %al
jne 0xd199
movq -0x80(%rbp), %rdi
addq $0xb8, %rdi
callq 0xf7b0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x19720
movq -0x90(%rbp), %rdi
callq 0x104b0
movq %rax, %rdi
callq 0x19770
movq %rax, -0x88(%rbp)
jmp 0xd14e
movq -0x88(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xd190
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xd190
movq -0x48(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xd190
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xda50
jmp 0xd23c
leaq -0x40(%rbp), %rdi
callq 0xda50
jmp 0xd19b
movq -0x80(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x197e0
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x19810
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x19840
testb $0x1, %al
jne 0xd1d6
jmp 0xd20c
leaq -0x68(%rbp), %rdi
callq 0x19880
movq (%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x78(%rbp), %rdi
callq 0x198a0
testb $0x1, %al
jne 0xd1fd
jmp 0xd1ff
jmp 0xd20c
jmp 0xd201
leaq -0x68(%rbp), %rdi
callq 0x198e0
jmp 0xd1c3
cmpq $0x0, -0x20(%rbp)
jne 0xd21a
cmpq $0x0, -0x28(%rbp)
je 0xd22f
movq -0x80(%rbp), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x19900
jmp 0xd231
jmp 0xd233
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)
nop