// File: /workspace/github_c_makefile_star2_O2/mattn[P]orelang/slre.c
// Function: match_op
static int match_op(const unsigned char *re, const unsigned char *s,
                    struct regex_info *info) {
  int result = 0;
  switch (*re) {
    case '\\':
      /* Metacharacters */
      switch (re[1]) {
        case 'S': FAIL_IF(isspace(*s), SLRE_NO_MATCH); result++; break;
        case 's': FAIL_IF(!isspace(*s), SLRE_NO_MATCH); result++; break;
        case 'd': FAIL_IF(!isdigit(*s), SLRE_NO_MATCH); result++; break;
        case 'b': FAIL_IF(*s != '\b', SLRE_NO_MATCH); result++; break;
        case 'f': FAIL_IF(*s != '\f', SLRE_NO_MATCH); result++; break;
        case 'n': FAIL_IF(*s != '\n', SLRE_NO_MATCH); result++; break;
        case 'r': FAIL_IF(*s != '\r', SLRE_NO_MATCH); result++; break;
        case 't': FAIL_IF(*s != '\t', SLRE_NO_MATCH); result++; break;
        case 'v': FAIL_IF(*s != '\v', SLRE_NO_MATCH); result++; break;

        case 'x':
          /* Match byte, \xHH where HH is hexadecimal byte representaion */
          FAIL_IF(hextoi(re + 2) != *s, SLRE_NO_MATCH);
          result++;
          break;

        default:
          /* Valid metacharacter check is done in bar() */
          FAIL_IF(re[1] != s[0], SLRE_NO_MATCH);
          result++;
          break;
      }
      break;

    case '|': FAIL_IF(1, SLRE_INTERNAL_ERROR); break;
    case '$': FAIL_IF(1, SLRE_NO_MATCH); break;
    case '.': result++; break;

    default:
      if (info->flags & SLRE_IGNORE_CASE) {
        FAIL_IF(tolower(*re) != tolower(*s), SLRE_NO_MATCH);
      } else {
        FAIL_IF(*re != *s, SLRE_NO_MATCH);
      }
      result++;
      break;
  }

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movzbl (%rdi), %r15d
cmpl $0x24, %r15d
je 0x9fcf
cmpl $0x2e, %r15d
je 0x9fe7
cmpl $0x7c, %r15d
je 0x9fbd
movq %rsi, %rbx
cmpl $0x5c, %r15d
jne 0x9fc1
movq %rdi, %r14
movb 0x1(%rdi), %al
movzbl %al, %ecx
leal -0x6e(%rcx), %edx
cmpl $0xa, %edx
ja 0x9ff5
leaq 0x680f(%rip), %rcx      # 0x107bc
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cmpb $0xa, (%rbx)
jne 0x9fcf
jmp 0x9fe7
pushq $-0x4
jmp 0x9fe9
testb $0x1, 0xfbc(%rdx)
jne 0x9fd3
cmpb (%rbx), %r15b
je 0x9fe7
pushq $-0x1
jmp 0x9fe9
callq 0x22a0
movq (%rax), %rax
movl (%rax,%r15,4), %ecx
movzbl (%rbx), %edx
cmpl (%rax,%rdx,4), %ecx
jne 0x9fcf
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x66, %ecx
je 0xa097
cmpl $0x62, %ecx
je 0xa0c0
cmpl $0x64, %ecx
je 0xa0a5
cmpl $0x53, %ecx
jne 0xa029
callq 0x22b0
movq (%rax), %rax
movzbl (%rbx), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x9fcf
jmp 0x9fe7
cmpb (%rbx), %al
jne 0x9fcf
jmp 0x9fe7
cmpb $0x9, (%rbx)
jne 0x9fcf
jmp 0x9fe7
callq 0x22b0
movq (%rax), %rax
movzbl (%rbx), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x9fcf
jmp 0x9fe7
cmpb $0xb, (%rbx)
jne 0x9fcf
jmp 0x9fe7
cmpb $0xd, (%rbx)
jne 0x9fcf
jmp 0x9fe7
callq 0x22a0
movq (%rax), %r15
movzbl 0x2(%r14), %eax
movl (%r15,%rax,4), %edi
callq 0xa0ce
movl %eax, %ebp
shll $0x4, %ebp
movzbl 0x3(%r14), %eax
movl (%r15,%rax,4), %edi
callq 0xa0ce
orl %ebp, %eax
movzbl (%rbx), %ecx
cmpl %ecx, %eax
jne 0x9fcf
jmp 0x9fe7
cmpb $0xc, (%rbx)
jne 0x9fcf
jmp 0x9fe7
callq 0x22b0
movq (%rax), %rax
movzbl (%rbx), %ecx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x9fcf
jmp 0x9fe7
cmpb $0x8, (%rbx)
jne 0x9fcf
jmp 0x9fe7