// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movzbl (%rdi), %r14d
cmpl $0x5b, %r14d
jg 0xc6b3
cmpl $0x24, %r14d
je 0xc707
cmpl $0x2e, %r14d
jne 0xc6f2
movl $0x1, %eax
jmp 0xc713
cmpl $0x7c, %r14d
je 0xc70e
cmpl $0x5c, %r14d
jne 0xc6f2
movb 0x1(%rdi), %cl
movzbl %cl, %eax
cmpl $0x65, %eax
jle 0xc73a
leal -0x6e(%rax), %edx
cmpl $0xa, %edx
ja 0xc793
leaq 0x80df(%rip), %rax      # 0x147bc
movslq (%rax,%rdx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0xa, (%rbx)
je 0xc6ac
jmp 0xc713
testb $0x1, 0xfbc(%rdx)
jne 0xc71b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb (%rbx), %r14b
je 0xc6ac
jmp 0xc713
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xc713
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x22a0
movq (%rax), %rcx
movl (%rcx,%r14,4), %edx
movzbl (%rbx), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl (%rcx,%rsi,4), %edx
je 0xc6ac
jmp 0xc713
cmpl $0x53, %eax
je 0xc766
cmpl $0x62, %eax
je 0xc783
cmpl $0x64, %eax
jne 0xc7ab
callq 0x22b0
movq (%rax), %rcx
movzbl (%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0xc6ac
jmp 0xc713
callq 0x22b0
movq (%rax), %rcx
movzbl (%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x20, 0x1(%rcx,%rdx,2)
je 0xc6ac
jmp 0xc713
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x8, (%rbx)
je 0xc6ac
jmp 0xc713
cmpl $0x66, %eax
jne 0xc7ab
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0xc, (%rbx)
je 0xc6ac
jmp 0xc713
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb (%rbx), %cl
je 0xc6ac
jmp 0xc713
callq 0x22b0
movq (%rax), %rcx
movzbl (%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0xc6ac
jmp 0xc713
addq $0x2, %rdi
callq 0xc836
movl %eax, %ecx
movzbl (%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, %ecx
je 0xc6ac
jmp 0xc713
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0xd, (%rbx)
je 0xc6ac
jmp 0xc713
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0xb, (%rbx)
je 0xc6ac
jmp 0xc713
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x9, (%rbx)
je 0xc6ac
jmp 0xc713