// File: /workspace/github_c_makefile_star2_O0/mattn[P]orelang/slre.c
// Function: match_set
static int match_set(const char *re, int re_len, const char *s,
                     struct regex_info *info) {
  int len = 0, result = -1, invert = re[0] == '^';

  if (invert) re++, re_len--;

  while (len <= re_len && re[len] != ']' && result <= 0) {
    /* Support character range */
    if (re[len] != '-' && re[len + 1] == '-' && re[len + 2] != ']' &&
        re[len + 2] != '\0') {
      result = info->flags &  SLRE_IGNORE_CASE ?
        tolower(*s) >= tolower(re[len]) && tolower(*s) <= tolower(re[len + 2]) :
        *s >= re[len] && *s <= re[len + 2];
      len += 3;
    } else {
      result = match_op((unsigned char *) re + len, (unsigned char *) s, info);
      len += op_len(re + len);
    }
  }
  return (!invert && result > 0) || (invert && result <= 0) ? 1 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5e, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0xf9c5
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf9c7
movl -0x24(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x2d(%rbp)
jg 0xf9f4
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x5d, %ecx
movb %al, -0x2d(%rbp)
je 0xf9f4
cmpl $0x0, -0x28(%rbp)
setle %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0xfa00
jmp 0xfb70
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
je 0xfb3a
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
jne 0xfb3a
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5d, %eax
je 0xfb3a
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xfb3a
movq -0x20(%rbp), %rax
movl 0xfbc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xfae2
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2180
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x2180
movl -0x34(%rbp), %ecx
movl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2e(%rbp)
jl 0xfad5
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2180
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x2180
movl %eax, %ecx
movl -0x38(%rbp), %eax
cmpl %ecx, %eax
setle %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0xfb29
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rdx
movsbl (%rax,%rdx), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x3d(%rbp)
jl 0xfb1e
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movq -0x8(%rbp), %rcx
movl -0x24(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
setle %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x24(%rbp)
jmp 0xfb6b
movq -0x8(%rbp), %rdi
movslq -0x24(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xfbc0
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x24(%rbp), %rax
addq %rax, %rdi
callq 0xf150
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0xf9c7
cmpl $0x0, -0x2c(%rbp)
jne 0xfb81
movb $0x1, %al
cmpl $0x0, -0x28(%rbp)
movb %al, -0x3e(%rbp)
jg 0xfb9c
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
movb %al, -0x3f(%rbp)
je 0xfb96
cmpl $0x0, -0x28(%rbp)
setle %al
movb %al, -0x3f(%rbp)
movb -0x3f(%rbp), %al
movb %al, -0x3e(%rbp)
movb -0x3e(%rbp), %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)