// File: yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::Trie::match(char const*, unsigned long, unsigned long&) const
size_t match(const char *text, size_t text_len, size_t &id) const {
    std::string lower_text;
    if (ignore_case_) {
      lower_text = to_lower(text);
      text = lower_text.data();
    }

    size_t match_len = 0;
    auto done = false;
    size_t len = 1;
    while (!done && len <= text_len) {
      std::string_view sv(text, len);
      auto it = dic_.find(sv);
      if (it == dic_.end()) {
        done = true;
      } else {
        if (it->second.match) {
          match_len = len;
          id = it->second.id;
        }
        if (it->second.done) { done = true; }
      }
      len += 1;
    }
    return match_len;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xa520
movq -0xd8(%rbp), %rax
testb $0x1, 0x30(%rax)
je 0xceb7
movq -0x10(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0xa660
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x18be0
jmp 0xce27
movq -0xd8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x18b40
jmp 0xce3d
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xa4a0
leaq -0x60(%rbp), %rdi
callq 0xa250
leaq -0x80(%rbp), %rdi
callq 0xa250
leaq -0x81(%rbp), %rdi
callq 0xa410
leaq -0x40(%rbp), %rdi
callq 0xa220
movq %rax, -0x10(%rbp)
jmp 0xceb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xcea6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xa250
leaq -0x81(%rbp), %rdi
callq 0xa410
jmp 0xd02c
movq $0x0, -0xa0(%rbp)
movb $0x0, -0xa1(%rbp)
movq $0x1, -0xb0(%rbp)
xorl %eax, %eax
testb $0x1, -0xa1(%rbp)
movb %al, -0xe9(%rbp)
jne 0xcef9
movq -0xb0(%rbp), %rax
cmpq -0x18(%rbp), %rax
setbe %al
movb %al, -0xe9(%rbp)
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0xcf08
jmp 0xd005
movq -0x10(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0xea40
movq -0xd8(%rbp), %rdi
movq -0x100(%rbp), %rsi
callq 0x18c90
movq %rax, -0xf8(%rbp)
jmp 0xcf42
movq -0xd8(%rbp), %rdi
movq -0xf8(%rbp), %rax
movq %rax, -0xc8(%rbp)
callq 0x18cf0
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x18cc0
testb $0x1, %al
jne 0xcf7c
jmp 0xcf9c
movb $0x1, -0xa1(%rbp)
jmp 0xcfee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xd02c
leaq -0xc8(%rbp), %rdi
callq 0x18d20
testb $0x1, 0x21(%rax)
je 0xcfd3
movq -0xb0(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x18d20
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
leaq -0xc8(%rbp), %rdi
callq 0x18d20
testb $0x1, 0x20(%rax)
je 0xcfec
movb $0x1, -0xa1(%rbp)
jmp 0xcfee
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0xced4
movq -0xa0(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xa250
movq -0x108(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0xa250
movq -0x90(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)