// File: /workspace/github_c_makefile_star2_O3/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 0xc4d2
cmpl $0x24, %r14d
je 0xc526
cmpl $0x2e, %r14d
jne 0xc511
movl $0x1, %eax
jmp 0xc532
cmpl $0x7c, %r14d
je 0xc52d
cmpl $0x5c, %r14d
jne 0xc511
movb 0x1(%rdi), %cl
movzbl %cl, %eax
cmpl $0x65, %eax
jle 0xc559
leal -0x6e(%rax), %edx
cmpl $0xa, %edx
ja 0xc5b2
leaq 0x82f4(%rip), %rax      # 0x147f0
movslq (%rax,%rdx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0xa, (%rbx)
je 0xc4cb
jmp 0xc532
testb $0x1, 0xfbc(%rdx)
jne 0xc53a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb (%rbx), %r14b
je 0xc4cb
jmp 0xc532
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xc532
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 0xc4cb
jmp 0xc532
cmpl $0x53, %eax
je 0xc585
cmpl $0x62, %eax
je 0xc5a2
cmpl $0x64, %eax
jne 0xc5ca
callq 0x22b0
movq (%rax), %rcx
movzbl (%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0xc4cb
jmp 0xc532
callq 0x22b0
movq (%rax), %rcx
movzbl (%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x20, 0x1(%rcx,%rdx,2)
je 0xc4cb
jmp 0xc532
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x8, (%rbx)
je 0xc4cb
jmp 0xc532
cmpl $0x66, %eax
jne 0xc5ca
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0xc, (%rbx)
je 0xc4cb
jmp 0xc532
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb (%rbx), %cl
je 0xc4cb
jmp 0xc532
callq 0x22b0
movq (%rax), %rcx
movzbl (%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0xc4cb
jmp 0xc532
movzbl 0x3(%rdi), %esi
movzbl 0x2(%rdi), %edi
callq 0xc659
movl %eax, %ecx
movzbl (%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, %ecx
je 0xc4cb
jmp 0xc532
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0xd, (%rbx)
je 0xc4cb
jmp 0xc532
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0xb, (%rbx)
je 0xc4cb
jmp 0xc532
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x9, (%rbx)
je 0xc4cb
jmp 0xc532