#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef scalar_t__ flags;

/* Variables and functions */
scalar_t__ isalnum(char);
scalar_t__ isalpha(char);
scalar_t__ isblank(char);
scalar_t__ iscntrl(char);
scalar_t__ isdigit(char);
scalar_t__ isgraph(char);
scalar_t__ islower(char);
scalar_t__ isprint(char);
scalar_t__ ispunct(char);
scalar_t__ isspace(char);
scalar_t__ isupper(char);
scalar_t__ isxdigit(char);
int /*<<< orphan*/ strncmp(char const *, char *, int);
char tolower(unsigned char);
char toupper(char);
int rangematch(const char *pattern, char test, int flags, const char **newp) {
  int negate, ok;
  char c, c2;
  char tmp;
  if ((negate = (*pattern == '!' || *pattern == '^')))
    ++pattern;
  if (((flags) & (0x10)))
    test = tolower((unsigned char)test);
  ok = 0;
  c = *pattern++;
  do {
    if (c == '\\' && !((flags) & (0x01)))
      c = *pattern++;
    if (c == '\0')
      return -1;
    if (c == '/' && ((flags) & (0x02)))
      return 0;
    if (*pattern == '-' && (c2 = *(pattern + 1)) != '\0' && c2 != ']') {
      pattern += 2;
      if (c2 == '\\' && !((flags) & (0x01)))
        c2 = *pattern++;
      if (c2 == '\0')
        return -1;
      if (((flags) & (0x10))) {
        c = tolower((unsigned char)c);
        c2 = tolower((unsigned char)c2);
      }
      if (c > c2) {
        tmp = c2;
        c2 = c;
        c = tmp;
      }
      if (c <= test && test <= c2) {
        ok = 1;
      }
    }
    if (c == '[' && *pattern == ':' && *(pattern + 1) != '\0') {
      if (!strncmp(pattern + 1, ":]", sizeof(":]") - 1)) {
        continue;
      }
      {{if (!strncmp(pattern + 1,
                     "alnum"
                     ":]",
                     sizeof("alnum"
                            ":]") -
                         1)){if (isalnum(test)){ok = 1;
    }
    pattern += sizeof("alnum"
                      ":]");
    continue;
  }
}
}
;
{{if (!strncmp(pattern + 1,
               "alpha"
               ":]",
               sizeof("alpha"
                      ":]") -
                   1)){if (isalpha(test)){ok = 1;
}
pattern += sizeof("alpha"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "blank"
               ":]",
               sizeof("blank"
                      ":]") -
                   1)){if (isblank(test)){ok = 1;
}
pattern += sizeof("blank"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "cntrl"
               ":]",
               sizeof("cntrl"
                      ":]") -
                   1)){if (iscntrl(test)){ok = 1;
}
pattern += sizeof("cntrl"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "digit"
               ":]",
               sizeof("digit"
                      ":]") -
                   1)){if (isdigit(test)){ok = 1;
}
pattern += sizeof("digit"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "graph"
               ":]",
               sizeof("graph"
                      ":]") -
                   1)){if (isgraph(test)){ok = 1;
}
pattern += sizeof("graph"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "lower"
               ":]",
               sizeof("lower"
                      ":]") -
                   1)){if (islower(test)){ok = 1;
}
pattern += sizeof("lower"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "print"
               ":]",
               sizeof("print"
                      ":]") -
                   1)){if (isprint(test)){ok = 1;
}
pattern += sizeof("print"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "punct"
               ":]",
               sizeof("punct"
                      ":]") -
                   1)){if (ispunct(test)){ok = 1;
}
pattern += sizeof("punct"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "space"
               ":]",
               sizeof("space"
                      ":]") -
                   1)){if (isspace(test)){ok = 1;
}
pattern += sizeof("space"
                  ":]");
continue;
}
}
}
;
{{if (!strncmp(pattern + 1,
               "xdigit"
               ":]",
               sizeof("xdigit"
                      ":]") -
                   1)){if (isxdigit(test)){ok = 1;
}
pattern += sizeof("xdigit"
                  ":]");
continue;
}
}
}
;
c2 = ((flags) & (0x10)) ? toupper(test) : test;
{{if (!strncmp(pattern + 1,
               "upper"
               ":]",
               sizeof("upper"
                      ":]") -
                   1)){if (isupper(c2)){ok = 1;
}
pattern += sizeof("upper"
                  ":]");
continue;
}
}
}
;
}
if (c == test) {
  ok = 1;
}
}
while ((c = *pattern++) != ']')
  ;
*newp = (const char *)pattern;
return (ok == negate) ? 0 : 1;
}


x86 assembly (clang, -O0):
<rangematch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x21,%ecx
mov    %al,-0x2c(%rbp)
je     122e <rangematch+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5e,%eax
sete   %al
mov    %al,-0x2c(%rbp)
mov    -0x2c(%rbp),%al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x24(%rbp)
test   $0x1,%al
jne    1249 <rangematch+0x59>
jmp    1255 <rangematch+0x65>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1270 <rangematch+0x80>
movzbl -0x11(%rbp),%edi
call   10c0 <tolower@plt>
mov    %al,-0x11(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x5c,%eax
jne    12bb <rangematch+0xcb>
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    12bb <rangematch+0xcb>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x0,%eax
jne    12d4 <rangematch+0xe4>
movl   $0xffffffff,-0x4(%rbp)
jmp    187b <rangematch+0x68b>
movsbl -0x29(%rbp),%eax
cmp    $0x2f,%eax
jne    12fc <rangematch+0x10c>
mov    -0x18(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     12fc <rangematch+0x10c>
movl   $0x0,-0x4(%rbp)
jmp    187b <rangematch+0x68b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    13f9 <rangematch+0x209>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x2a(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     13f9 <rangematch+0x209>
movsbl -0x2a(%rbp),%eax
cmp    $0x5d,%eax
je     13f9 <rangematch+0x209>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
movsbl -0x2a(%rbp),%eax
cmp    $0x5c,%eax
jne    136b <rangematch+0x17b>
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    136b <rangematch+0x17b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x2a(%rbp)
movsbl -0x2a(%rbp),%eax
cmp    $0x0,%eax
jne    1384 <rangematch+0x194>
movl   $0xffffffff,-0x4(%rbp)
jmp    187b <rangematch+0x68b>
mov    -0x18(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     13ab <rangematch+0x1bb>
movzbl -0x29(%rbp),%edi
call   10c0 <tolower@plt>
mov    %al,-0x29(%rbp)
movzbl -0x2a(%rbp),%edi
call   10c0 <tolower@plt>
mov    %al,-0x2a(%rbp)
movsbl -0x29(%rbp),%eax
movsbl -0x2a(%rbp),%ecx
cmp    %ecx,%eax
jle    13cd <rangematch+0x1dd>
mov    -0x2a(%rbp),%al
mov    %al,-0x2b(%rbp)
mov    -0x29(%rbp),%al
mov    %al,-0x2a(%rbp)
mov    -0x2b(%rbp),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jg     13f4 <rangematch+0x204>
movsbl -0x11(%rbp),%eax
movsbl -0x2a(%rbp),%ecx
cmp    %ecx,%eax
jg     13f4 <rangematch+0x204>
movl   $0x1,-0x28(%rbp)
jmp    13f9 <rangematch+0x209>
movsbl -0x29(%rbp),%eax
cmp    $0x5b,%eax
jne    181f <rangematch+0x62f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    181f <rangematch+0x62f>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     181f <rangematch+0x62f>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xbd7(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    144e <rangematch+0x25e>
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xba3(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    149b <rangematch+0x2ab>
movsbl -0x11(%rbp),%edi
call   1080 <isalnum@plt>
cmp    $0x0,%rax
je     148a <rangematch+0x29a>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xb5e(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    14e8 <rangematch+0x2f8>
movsbl -0x11(%rbp),%edi
call   10d0 <isalpha@plt>
cmp    $0x0,%rax
je     14d7 <rangematch+0x2e7>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xb19(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1535 <rangematch+0x345>
movsbl -0x11(%rbp),%edi
call   1090 <isblank@plt>
cmp    $0x0,%rax
je     1524 <rangematch+0x334>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xad4(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1582 <rangematch+0x392>
movsbl -0x11(%rbp),%edi
call   1070 <iscntrl@plt>
cmp    $0x0,%rax
je     1571 <rangematch+0x381>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xab8(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    15cf <rangematch+0x3df>
movsbl -0x11(%rbp),%edi
call   1040 <isdigit@plt>
cmp    $0x0,%rax
je     15be <rangematch+0x3ce>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xa42(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    161c <rangematch+0x42c>
movsbl -0x11(%rbp),%edi
call   1110 <isgraph@plt>
cmp    $0x0,%rax
je     160b <rangematch+0x41b>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0x9fd(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1669 <rangematch+0x479>
movsbl -0x11(%rbp),%edi
call   1050 <islower@plt>
cmp    $0x0,%rax
je     1658 <rangematch+0x468>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0x9b8(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    16b6 <rangematch+0x4c6>
movsbl -0x11(%rbp),%edi
call   10f0 <isprint@plt>
cmp    $0x0,%rax
je     16a5 <rangematch+0x4b5>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0x973(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1703 <rangematch+0x513>
movsbl -0x11(%rbp),%edi
call   10a0 <ispunct@plt>
cmp    $0x0,%rax
je     16f2 <rangematch+0x502>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0x92e(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1750 <rangematch+0x560>
movsbl -0x11(%rbp),%edi
call   10b0 <isspace@plt>
cmp    $0x0,%rax
je     173f <rangematch+0x54f>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0x8e9(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    179d <rangematch+0x5ad>
movsbl -0x11(%rbp),%edi
call   1100 <isxdigit@plt>
cmp    $0x0,%rax
je     178c <rangematch+0x59c>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x9,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x18(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     17c0 <rangematch+0x5d0>
movsbl -0x11(%rbp),%edi
call   1060 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0x30(%rbp)
jmp    17c7 <rangematch+0x5d7>
movsbl -0x11(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    %al,-0x2a(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0x875(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    181a <rangematch+0x62a>
movsbl -0x2a(%rbp),%edi
call   10e0 <isupper@plt>
cmp    $0x0,%rax
je     1809 <rangematch+0x619>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    183b <rangematch+0x64b>
jmp    181f <rangematch+0x62f>
movsbl -0x29(%rbp),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1836 <rangematch+0x646>
movl   $0x1,-0x28(%rbp)
jmp    183b <rangematch+0x64b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x29(%rbp)
movsbl %al,%eax
cmp    $0x5d,%eax
jne    128b <rangematch+0x9b>
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%edx
mov    -0x24(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rangematch>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,0x10(%rsp)
mov    %edx,%r12d
mov    (%rdi),%al
cmp    $0x21,%al
sete   %cl
cmp    $0x5e,%al
sete   %al
or     %cl,%al
movzbl %al,%eax
mov    %rax,0x8(%rsp)
lea    (%rax,%rdi,1),%rbp
test   $0x10,%r12b
je     1231 <rangematch+0x41>
movzbl %sil,%edi
call   10c0 <tolower@plt>
mov    %eax,%esi
mov    0x0(%rbp),%r13b
add    $0x1,%rbp
xor    %r15d,%r15d
mov    $0x1,%edx
mov    %esi,0x4(%rsp)
jmp    128c <rangematch+0x9c>
mov    %rbp,%rdi
lea    0xe00(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
mov    0x4(%rsp),%esi
mov    $0x1,%edx
je     15d6 <rangematch+0x3e6>
nopl   0x0(%rax)
cmp    %sil,%r13b
cmove  %edx,%r15d
movzbl (%r14),%r13d
mov    %r14,%rbp
add    $0x1,%rbp
cmp    $0x5d,%r13b
je     15ec <rangematch+0x3fc>
test   $0x1,%r12b
jne    12a1 <rangematch+0xb1>
cmp    $0x5c,%r13b
jne    12a1 <rangematch+0xb1>
movzbl 0x0(%rbp),%r13d
add    $0x1,%rbp
mov    $0xffffffff,%eax
cmp    $0x2f,%r13b
je     12c0 <rangematch+0xd0>
test   %r13b,%r13b
jne    12ca <rangematch+0xda>
jmp    1602 <rangematch+0x412>
cs nopw 0x0(%rax,%rax,1)
test   $0x2,%r12b
jne    1600 <rangematch+0x410>
cmpb   $0x2d,0x0(%rbp)
jne    12f0 <rangematch+0x100>
movzbl 0x1(%rbp),%ebx
test   %bl,%bl
je     12f0 <rangematch+0x100>
cmp    $0x5d,%bl
jne    1487 <rangematch+0x297>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbp,%r14
cmp    $0x5b,%r13b
jne    1270 <rangematch+0x80>
cmpb   $0x3a,(%r14)
jne    1270 <rangematch+0x80>
cmpb   $0x0,0x1(%r14)
je     1270 <rangematch+0x80>
lea    0x1(%r14),%rbp
mov    %rbp,%rdi
lea    0xced(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1504 <rangematch+0x314>
mov    %rbp,%rdi
lea    0xcc4(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1512 <rangematch+0x322>
mov    %rbp,%rdi
lea    0xcb0(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1520 <rangematch+0x330>
mov    %rbp,%rdi
lea    0xc9c(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     152e <rangematch+0x33e>
mov    %rbp,%rdi
lea    0xc88(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     153c <rangematch+0x34c>
mov    %rbp,%rdi
lea    0xc9d(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     154a <rangematch+0x35a>
mov    %rbp,%rdi
lea    0xc58(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1558 <rangematch+0x368>
mov    %rbp,%rdi
lea    0xc44(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1566 <rangematch+0x376>
mov    %rbp,%rdi
lea    0xc30(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1574 <rangematch+0x384>
mov    %rbp,%rdi
lea    0xc1c(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1582 <rangematch+0x392>
mov    %rbp,%rdi
lea    0xc08(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1590 <rangematch+0x3a0>
mov    %rbp,%rdi
lea    0xbf4(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     15b3 <rangematch+0x3c3>
mov    0x4(%rsp),%eax
mov    %eax,%ebx
test   $0x10,%r12b
je     1247 <rangematch+0x57>
movsbl 0x4(%rsp),%edi
call   1060 <toupper@plt>
mov    %eax,%ebx
jmp    1247 <rangematch+0x57>
lea    0x2(%rbp),%r14
test   $0x1,%r12b
jne    14a9 <rangematch+0x2b9>
cmp    $0x5c,%bl
jne    14a9 <rangematch+0x2b9>
movzbl 0x2(%rbp),%ebx
test   %bl,%bl
je     1602 <rangematch+0x412>
add    $0x3,%rbp
mov    %rbp,%r14
test   $0x10,%r12b
je     14ce <rangematch+0x2de>
movzbl %r13b,%edi
call   10c0 <tolower@plt>
mov    %eax,%r13d
movzbl %bl,%edi
call   10c0 <tolower@plt>
mov    $0x1,%edx
mov    0x4(%rsp),%esi
mov    %eax,%ebx
cmp    %bl,%r13b
movzbl %bl,%eax
movzbl %r13b,%ecx
mov    %ecx,%r13d
cmovg  %eax,%r13d
cmovg  %ecx,%eax
cmp    %al,%sil
mov    $0x1,%eax
cmovg  %r15d,%eax
cmp    %sil,%r13b
cmovle %eax,%r15d
cmp    $0x5b,%r13b
jne    1270 <rangematch+0x80>
jmp    12fd <rangematch+0x10d>
mov    0x4(%rsp),%esi
mov    $0x1,%edx
jmp    1277 <rangematch+0x87>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   1080 <isalnum@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   10d0 <isalpha@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   1090 <isblank@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   1070 <iscntrl@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   1040 <isdigit@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   1110 <isgraph@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   1050 <islower@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   10f0 <isprint@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   10a0 <ispunct@plt>
jmp    159c <rangematch+0x3ac>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   10b0 <isspace@plt>
mov    %ebx,%esi
test   %rax,%rax
mov    $0x1,%edx
cmovne %edx,%r15d
add    $0x8,%r14
jmp    1277 <rangematch+0x87>
mov    0x4(%rsp),%ebx
movsbl %bl,%edi
call   1100 <isxdigit@plt>
mov    %ebx,%esi
test   %rax,%rax
mov    $0x1,%edx
cmovne %edx,%r15d
add    $0x9,%r14
jmp    1277 <rangematch+0x87>
movsbl %bl,%edi
call   10e0 <isupper@plt>
mov    $0x1,%edx
mov    0x4(%rsp),%esi
test   %rax,%rax
jmp    15a6 <rangematch+0x3b6>
mov    0x10(%rsp),%rax
mov    %rbp,(%rax)
xor    %eax,%eax
cmp    0x8(%rsp),%r15d
setne  %al
jmp    1602 <rangematch+0x412>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c":]\00"
@.str.1 = [8 x i8] c"alnum:]\00"
@.str.2 = [8 x i8] c"alpha:]\00"
@.str.3 = [8 x i8] c"blank:]\00"
@.str.4 = [8 x i8] c"cntrl:]\00"
@.str.5 = [8 x i8] c"digit:]\00"
@.str.6 = [8 x i8] c"graph:]\00"
@.str.7 = [8 x i8] c"lower:]\00"
@.str.8 = [8 x i8] c"print:]\00"
@.str.9 = [8 x i8] c"punct:]\00"
@.str.10 = [8 x i8] c"space:]\00"
@.str.11 = [9 x i8] c"xdigit:]\00"
@.str.12 = [8 x i8] c"upper:]\00"
define i32 @rangematch(i8* %0, i8 signext %1, i32 %2, i8** %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i32
%9 = alloca i8**
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
%13 = alloca i8
%14 = alloca i8
store i8* %0, i8** %6
store i8 %1, i8* %7
store i32 %2, i32* %8
store i8** %3, i8*** %9
%15 = load i8*, i8** %6
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 33
br i1 %18, label %24, label %19
19: ; preds = %4
%20 = load i8*, i8** %6
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 94
br label %24
24: ; preds = %19, %4
%25 = phi i1 [ true, %4 ], [ %23, %19 ]
%26 = zext i1 %25 to i32
store i32 %26, i32* %10
br i1 %25, label %27, label %30
27: ; preds = %24
%28 = load i8*, i8** %6
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %6
br label %30
30: ; preds = %27, %24
%31 = load i32, i32* %8
%32 = and i32 %31, 16
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %30
%35 = load i8, i8* %7
%36 = call signext i8 @tolower(i8 zeroext %35)
store i8 %36, i8* %7
br label %37
37: ; preds = %34, %30
store i32 0, i32* %11
%38 = load i8*, i8** %6
%39 = getelementptr inbounds i8, i8* %38, i32 1
store i8* %39, i8** %6
%40 = load i8, i8* %38
store i8 %40, i8* %12
br label %41
41: ; preds = %333, %37
%42 = load i8, i8* %12
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 92
br i1 %44, label %45, label %53
45: ; preds = %41
%46 = load i32, i32* %8
%47 = and i32 %46, 1
%48 = icmp ne i32 %47, 0
br i1 %48, label %53, label %49
49: ; preds = %45
%50 = load i8*, i8** %6
%51 = getelementptr inbounds i8, i8* %50, i32 1
store i8* %51, i8** %6
%52 = load i8, i8* %50
store i8 %52, i8* %12
br label %53
53: ; preds = %49, %45, %41
%54 = load i8, i8* %12
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %58
57: ; preds = %53
store i32 -1, i32* %5
br label %347
58: ; preds = %53
%59 = load i8, i8* %12
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 47
br i1 %61, label %62, label %67
62: ; preds = %58
%63 = load i32, i32* %8
%64 = and i32 %63, 2
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %62
store i32 0, i32* %5
br label %347
67: ; preds = %62, %58
%68 = load i8*, i8** %6
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp eq i32 %70, 45
br i1 %71, label %72, label %134
72: ; preds = %67
%73 = load i8*, i8** %6
%74 = getelementptr inbounds i8, i8* %73, i64 1
%75 = load i8, i8* %74
store i8 %75, i8* %13
%76 = sext i8 %75 to i32
%77 = icmp ne i32 %76, 0
br i1 %77, label %78, label %134
78: ; preds = %72
%79 = load i8, i8* %13
%80 = sext i8 %79 to i32
%81 = icmp ne i32 %80, 93
br i1 %81, label %82, label %134
82: ; preds = %78
%83 = load i8*, i8** %6
%84 = getelementptr inbounds i8, i8* %83, i64 2
store i8* %84, i8** %6
%85 = load i8, i8* %13
%86 = sext i8 %85 to i32
%87 = icmp eq i32 %86, 92
br i1 %87, label %88, label %96
88: ; preds = %82
%89 = load i32, i32* %8
%90 = and i32 %89, 1
%91 = icmp ne i32 %90, 0
br i1 %91, label %96, label %92
92: ; preds = %88
%93 = load i8*, i8** %6
%94 = getelementptr inbounds i8, i8* %93, i32 1
store i8* %94, i8** %6
%95 = load i8, i8* %93
store i8 %95, i8* %13
br label %96
96: ; preds = %92, %88, %82
%97 = load i8, i8* %13
%98 = sext i8 %97 to i32
%99 = icmp eq i32 %98, 0
br i1 %99, label %100, label %101
100: ; preds = %96
store i32 -1, i32* %5
br label %347
101: ; preds = %96
%102 = load i32, i32* %8
%103 = and i32 %102, 16
%104 = icmp ne i32 %103, 0
br i1 %104, label %105, label %110
105: ; preds = %101
%106 = load i8, i8* %12
%107 = call signext i8 @tolower(i8 zeroext %106)
store i8 %107, i8* %12
%108 = load i8, i8* %13
%109 = call signext i8 @tolower(i8 zeroext %108)
store i8 %109, i8* %13
br label %110
110: ; preds = %105, %101
%111 = load i8, i8* %12
%112 = sext i8 %111 to i32
%113 = load i8, i8* %13
%114 = sext i8 %113 to i32
%115 = icmp sgt i32 %112, %114
br i1 %115, label %116, label %120
116: ; preds = %110
%117 = load i8, i8* %13
store i8 %117, i8* %14
%118 = load i8, i8* %12
store i8 %118, i8* %13
%119 = load i8, i8* %14
store i8 %119, i8* %12
br label %120
120: ; preds = %116, %110
%121 = load i8, i8* %12
%122 = sext i8 %121 to i32
%123 = load i8, i8* %7
%124 = sext i8 %123 to i32
%125 = icmp sle i32 %122, %124
br i1 %125, label %126, label %133
126: ; preds = %120
%127 = load i8, i8* %7
%128 = sext i8 %127 to i32
%129 = load i8, i8* %13
%130 = sext i8 %129 to i32
%131 = icmp sle i32 %128, %130
br i1 %131, label %132, label %133
132: ; preds = %126
store i32 1, i32* %11
br label %133
133: ; preds = %132, %126, %120
br label %134
134: ; preds = %133, %78, %72, %67
%135 = load i8, i8* %12
%136 = sext i8 %135 to i32
%137 = icmp eq i32 %136, 91
br i1 %137, label %138, label %325
138: ; preds = %134
%139 = load i8*, i8** %6
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = icmp eq i32 %141, 58
br i1 %142, label %143, label %325
143: ; preds = %138
%144 = load i8*, i8** %6
%145 = getelementptr inbounds i8, i8* %144, i64 1
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
%148 = icmp ne i32 %147, 0
br i1 %148, label %149, label %325
149: ; preds = %143
%150 = load i8*, i8** %6
%151 = getelementptr inbounds i8, i8* %150, i64 1
%152 = call i32 @strncmp(i8* %151, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%153 = icmp ne i32 %152, 0
br i1 %153, label %155, label %154
154: ; preds = %149
br label %333
155: ; preds = %149
%156 = load i8*, i8** %6
%157 = getelementptr inbounds i8, i8* %156, i64 1
%158 = call i32 @strncmp(i8* %157, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 7)
%159 = icmp ne i32 %158, 0
br i1 %159, label %168, label %160
160: ; preds = %155
%161 = load i8, i8* %7
%162 = call i64 @isalnum(i8 signext %161)
%163 = icmp ne i64 %162, 0
br i1 %163, label %164, label %165
164: ; preds = %160
store i32 1, i32* %11
br label %165
165: ; preds = %164, %160
%166 = load i8*, i8** %6
%167 = getelementptr inbounds i8, i8* %166, i64 8
store i8* %167, i8** %6
br label %333
168: ; preds = %155
%169 = load i8*, i8** %6
%170 = getelementptr inbounds i8, i8* %169, i64 1
%171 = call i32 @strncmp(i8* %170, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 7)
%172 = icmp ne i32 %171, 0
br i1 %172, label %181, label %173
173: ; preds = %168
%174 = load i8, i8* %7
%175 = call i64 @isalpha(i8 signext %174)
%176 = icmp ne i64 %175, 0
br i1 %176, label %177, label %178
177: ; preds = %173
store i32 1, i32* %11
br label %178
178: ; preds = %177, %173
%179 = load i8*, i8** %6
%180 = getelementptr inbounds i8, i8* %179, i64 8
store i8* %180, i8** %6
br label %333
181: ; preds = %168
%182 = load i8*, i8** %6
%183 = getelementptr inbounds i8, i8* %182, i64 1
%184 = call i32 @strncmp(i8* %183, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%185 = icmp ne i32 %184, 0
br i1 %185, label %194, label %186
186: ; preds = %181
%187 = load i8, i8* %7
%188 = call i64 @isblank(i8 signext %187)
%189 = icmp ne i64 %188, 0
br i1 %189, label %190, label %191
190: ; preds = %186
store i32 1, i32* %11
br label %191
191: ; preds = %190, %186
%192 = load i8*, i8** %6
%193 = getelementptr inbounds i8, i8* %192, i64 8
store i8* %193, i8** %6
br label %333
194: ; preds = %181
%195 = load i8*, i8** %6
%196 = getelementptr inbounds i8, i8* %195, i64 1
%197 = call i32 @strncmp(i8* %196, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 7)
%198 = icmp ne i32 %197, 0
br i1 %198, label %207, label %199
199: ; preds = %194
%200 = load i8, i8* %7
%201 = call i64 @iscntrl(i8 signext %200)
%202 = icmp ne i64 %201, 0
br i1 %202, label %203, label %204
203: ; preds = %199
store i32 1, i32* %11
br label %204
204: ; preds = %203, %199
%205 = load i8*, i8** %6
%206 = getelementptr inbounds i8, i8* %205, i64 8
store i8* %206, i8** %6
br label %333
207: ; preds = %194
%208 = load i8*, i8** %6
%209 = getelementptr inbounds i8, i8* %208, i64 1
%210 = call i32 @strncmp(i8* %209, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 7)
%211 = icmp ne i32 %210, 0
br i1 %211, label %220, label %212
212: ; preds = %207
%213 = load i8, i8* %7
%214 = call i64 @isdigit(i8 signext %213)
%215 = icmp ne i64 %214, 0
br i1 %215, label %216, label %217
216: ; preds = %212
store i32 1, i32* %11
br label %217
217: ; preds = %216, %212
%218 = load i8*, i8** %6
%219 = getelementptr inbounds i8, i8* %218, i64 8
store i8* %219, i8** %6
br label %333
220: ; preds = %207
%221 = load i8*, i8** %6
%222 = getelementptr inbounds i8, i8* %221, i64 1
%223 = call i32 @strncmp(i8* %222, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 7)
%224 = icmp ne i32 %223, 0
br i1 %224, label %233, label %225
225: ; preds = %220
%226 = load i8, i8* %7
%227 = call i64 @isgraph(i8 signext %226)
%228 = icmp ne i64 %227, 0
br i1 %228, label %229, label %230
229: ; preds = %225
store i32 1, i32* %11
br label %230
230: ; preds = %229, %225
%231 = load i8*, i8** %6
%232 = getelementptr inbounds i8, i8* %231, i64 8
store i8* %232, i8** %6
br label %333
233: ; preds = %220
%234 = load i8*, i8** %6
%235 = getelementptr inbounds i8, i8* %234, i64 1
%236 = call i32 @strncmp(i8* %235, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 7)
%237 = icmp ne i32 %236, 0
br i1 %237, label %246, label %238
238: ; preds = %233
%239 = load i8, i8* %7
%240 = call i64 @islower(i8 signext %239)
%241 = icmp ne i64 %240, 0
br i1 %241, label %242, label %243
242: ; preds = %238
store i32 1, i32* %11
br label %243
243: ; preds = %242, %238
%244 = load i8*, i8** %6
%245 = getelementptr inbounds i8, i8* %244, i64 8
store i8* %245, i8** %6
br label %333
246: ; preds = %233
%247 = load i8*, i8** %6
%248 = getelementptr inbounds i8, i8* %247, i64 1
%249 = call i32 @strncmp(i8* %248, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 7)
%250 = icmp ne i32 %249, 0
br i1 %250, label %259, label %251
251: ; preds = %246
%252 = load i8, i8* %7
%253 = call i64 @isprint(i8 signext %252)
%254 = icmp ne i64 %253, 0
br i1 %254, label %255, label %256
255: ; preds = %251
store i32 1, i32* %11
br label %256
256: ; preds = %255, %251
%257 = load i8*, i8** %6
%258 = getelementptr inbounds i8, i8* %257, i64 8
store i8* %258, i8** %6
br label %333
259: ; preds = %246
%260 = load i8*, i8** %6
%261 = getelementptr inbounds i8, i8* %260, i64 1
%262 = call i32 @strncmp(i8* %261, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 7)
%263 = icmp ne i32 %262, 0
br i1 %263, label %272, label %264
264: ; preds = %259
%265 = load i8, i8* %7
%266 = call i64 @ispunct(i8 signext %265)
%267 = icmp ne i64 %266, 0
br i1 %267, label %268, label %269
268: ; preds = %264
store i32 1, i32* %11
br label %269
269: ; preds = %268, %264
%270 = load i8*, i8** %6
%271 = getelementptr inbounds i8, i8* %270, i64 8
store i8* %271, i8** %6
br label %333
272: ; preds = %259
%273 = load i8*, i8** %6
%274 = getelementptr inbounds i8, i8* %273, i64 1
%275 = call i32 @strncmp(i8* %274, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 7)
%276 = icmp ne i32 %275, 0
br i1 %276, label %285, label %277
277: ; preds = %272
%278 = load i8, i8* %7
%279 = call i64 @isspace(i8 signext %278)
%280 = icmp ne i64 %279, 0
br i1 %280, label %281, label %282
281: ; preds = %277
store i32 1, i32* %11
br label %282
282: ; preds = %281, %277
%283 = load i8*, i8** %6
%284 = getelementptr inbounds i8, i8* %283, i64 8
store i8* %284, i8** %6
br label %333
285: ; preds = %272
%286 = load i8*, i8** %6
%287 = getelementptr inbounds i8, i8* %286, i64 1
%288 = call i32 @strncmp(i8* %287, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 8)
%289 = icmp ne i32 %288, 0
br i1 %289, label %298, label %290
290: ; preds = %285
%291 = load i8, i8* %7
%292 = call i64 @isxdigit(i8 signext %291)
%293 = icmp ne i64 %292, 0
br i1 %293, label %294, label %295
294: ; preds = %290
store i32 1, i32* %11
br label %295
295: ; preds = %294, %290
%296 = load i8*, i8** %6
%297 = getelementptr inbounds i8, i8* %296, i64 9
store i8* %297, i8** %6
br label %333
298: ; preds = %285
%299 = load i32, i32* %8
%300 = and i32 %299, 16
%301 = icmp ne i32 %300, 0
br i1 %301, label %302, label %306
302: ; preds = %298
%303 = load i8, i8* %7
%304 = call signext i8 @toupper(i8 signext %303)
%305 = sext i8 %304 to i32
br label %309
306: ; preds = %298
%307 = load i8, i8* %7
%308 = sext i8 %307 to i32
br label %309
309: ; preds = %306, %302
%310 = phi i32 [ %305, %302 ], [ %308, %306 ]
%311 = trunc i32 %310 to i8
store i8 %311, i8* %13
%312 = load i8*, i8** %6
%313 = getelementptr inbounds i8, i8* %312, i64 1
%314 = call i32 @strncmp(i8* %313, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 7)
%315 = icmp ne i32 %314, 0
br i1 %315, label %324, label %316
316: ; preds = %309
%317 = load i8, i8* %13
%318 = call i64 @isupper(i8 signext %317)
%319 = icmp ne i64 %318, 0
br i1 %319, label %320, label %321
320: ; preds = %316
store i32 1, i32* %11
br label %321
321: ; preds = %320, %316
%322 = load i8*, i8** %6
%323 = getelementptr inbounds i8, i8* %322, i64 8
store i8* %323, i8** %6
br label %333
324: ; preds = %309
br label %325
325: ; preds = %324, %143, %138, %134
%326 = load i8, i8* %12
%327 = sext i8 %326 to i32
%328 = load i8, i8* %7
%329 = sext i8 %328 to i32
%330 = icmp eq i32 %327, %329
br i1 %330, label %331, label %332
331: ; preds = %325
store i32 1, i32* %11
br label %332
332: ; preds = %331, %325
br label %333
333: ; preds = %332, %321, %295, %282, %269, %256, %243, %230, %217, %204, %191, %178, %165, %154
%334 = load i8*, i8** %6
%335 = getelementptr inbounds i8, i8* %334, i32 1
store i8* %335, i8** %6
%336 = load i8, i8* %334
store i8 %336, i8* %12
%337 = sext i8 %336 to i32
%338 = icmp ne i32 %337, 93
br i1 %338, label %41, label %339
339: ; preds = %333
%340 = load i8*, i8** %6
%341 = load i8**, i8*** %9
store i8* %340, i8** %341
%342 = load i32, i32* %11
%343 = load i32, i32* %10
%344 = icmp eq i32 %342, %343
%345 = zext i1 %344 to i64
%346 = select i1 %344, i32 0, i32 1
store i32 %346, i32* %5
br label %347
347: ; preds = %339, %100, %66, %57
%348 = load i32, i32* %5
ret i32 %348
}

LLVM IR (-O2):
@.str = [3 x i8] c":]\00"
@.str.1 = [8 x i8] c"alnum:]\00"
@.str.2 = [8 x i8] c"alpha:]\00"
@.str.3 = [8 x i8] c"blank:]\00"
@.str.4 = [8 x i8] c"cntrl:]\00"
@.str.5 = [8 x i8] c"digit:]\00"
@.str.6 = [8 x i8] c"graph:]\00"
@.str.7 = [8 x i8] c"lower:]\00"
@.str.8 = [8 x i8] c"print:]\00"
@.str.9 = [8 x i8] c"punct:]\00"
@.str.10 = [8 x i8] c"space:]\00"
@.str.11 = [9 x i8] c"xdigit:]\00"
@.str.12 = [8 x i8] c"upper:]\00"
define i32 @rangematch(i8* %0, i8 signext %1, i32 %2, i8** nocapture writeonly %3) {
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 33
%7 = icmp eq i8 %5, 94
%8 = or i1 %6, %7
%9 = zext i1 %8 to i32
%10 = zext i1 %8 to i64
%11 = getelementptr i8, i8* %0, i64 %10
%12 = and i32 %2, 16
%13 = icmp eq i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %4
%15 = tail call signext i8 @tolower(i8 zeroext %1)
br label %16
16: ; preds = %14, %4
%17 = phi i8 [ %15, %14 ], [ %1, %4 ]
%18 = getelementptr inbounds i8, i8* %11, i64 1
%19 = load i8, i8* %11
%20 = and i32 %2, 1
%21 = icmp eq i32 %20, 0
%22 = and i32 %2, 2
%23 = icmp eq i32 %22, 0
br label %24
24: ; preds = %185, %16
%25 = phi i8* [ %18, %16 ], [ %188, %185 ]
%26 = phi i32 [ 0, %16 ], [ %187, %185 ]
%27 = phi i8 [ %19, %16 ], [ %189, %185 ]
%28 = icmp eq i8 %27, 92
%29 = and i1 %21, %28
br i1 %29, label %30, label %33
30: ; preds = %24
%31 = getelementptr inbounds i8, i8* %25, i64 1
%32 = load i8, i8* %25
br label %33
33: ; preds = %30, %24
%34 = phi i8* [ %31, %30 ], [ %25, %24 ]
%35 = phi i8 [ %32, %30 ], [ %27, %24 ]
switch i8 %35, label %37 [
i8 0, label %194
i8 47, label %36
]
36: ; preds = %33
br i1 %23, label %37, label %194
37: ; preds = %33, %36
%38 = load i8, i8* %34
%39 = icmp eq i8 %38, 45
br i1 %39, label %40, label %67
40: ; preds = %37
%41 = getelementptr inbounds i8, i8* %34, i64 1
%42 = load i8, i8* %41
switch i8 %42, label %43 [
i8 93, label %67
i8 0, label %67
]
43: ; preds = %40
%44 = getelementptr inbounds i8, i8* %34, i64 2
%45 = icmp eq i8 %42, 92
%46 = and i1 %21, %45
br i1 %46, label %47, label %51
47: ; preds = %43
%48 = getelementptr inbounds i8, i8* %34, i64 3
%49 = load i8, i8* %44
%50 = icmp eq i8 %49, 0
br i1 %50, label %194, label %51
51: ; preds = %43, %47
%52 = phi i8 [ %49, %47 ], [ %42, %43 ]
%53 = phi i8* [ %48, %47 ], [ %44, %43 ]
br i1 %13, label %57, label %54
54: ; preds = %51
%55 = tail call signext i8 @tolower(i8 zeroext %35)
%56 = tail call signext i8 @tolower(i8 zeroext %52)
br label %57
57: ; preds = %54, %51
%58 = phi i8 [ %55, %54 ], [ %35, %51 ]
%59 = phi i8 [ %56, %54 ], [ %52, %51 ]
%60 = icmp sgt i8 %58, %59
%61 = select i1 %60, i8 %59, i8 %58
%62 = select i1 %60, i8 %58, i8 %59
%63 = icmp sgt i8 %61, %17
%64 = icmp sgt i8 %17, %62
%65 = select i1 %63, i1 true, i1 %64
%66 = select i1 %65, i32 %26, i32 1
br label %67
67: ; preds = %57, %40, %40, %37
%68 = phi i8* [ %34, %40 ], [ %34, %37 ], [ %34, %40 ], [ %53, %57 ]
%69 = phi i32 [ %26, %40 ], [ %26, %37 ], [ %26, %40 ], [ %66, %57 ]
%70 = phi i8 [ %35, %40 ], [ %35, %37 ], [ %35, %40 ], [ %61, %57 ]
%71 = icmp eq i8 %70, 91
br i1 %71, label %72, label %182
72: ; preds = %67
%73 = load i8, i8* %68
%74 = icmp eq i8 %73, 58
br i1 %74, label %75, label %182
75: ; preds = %72
%76 = getelementptr inbounds i8, i8* %68, i64 1
%77 = load i8, i8* %76
%78 = icmp eq i8 %77, 0
br i1 %78, label %182, label %79
79: ; preds = %75
%80 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%81 = icmp eq i32 %80, 0
br i1 %81, label %185, label %82
82: ; preds = %79
%83 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 7)
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %90
85: ; preds = %82
%86 = tail call i64 @isalnum(i8 signext %17)
%87 = icmp eq i64 %86, 0
%88 = select i1 %87, i32 %69, i32 1
%89 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
90: ; preds = %82
%91 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 7)
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %98
93: ; preds = %90
%94 = tail call i64 @isalpha(i8 signext %17)
%95 = icmp eq i64 %94, 0
%96 = select i1 %95, i32 %69, i32 1
%97 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
98: ; preds = %90
%99 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %106
101: ; preds = %98
%102 = tail call i64 @isblank(i8 signext %17)
%103 = icmp eq i64 %102, 0
%104 = select i1 %103, i32 %69, i32 1
%105 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
106: ; preds = %98
%107 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 7)
%108 = icmp eq i32 %107, 0
br i1 %108, label %109, label %114
109: ; preds = %106
%110 = tail call i64 @iscntrl(i8 signext %17)
%111 = icmp eq i64 %110, 0
%112 = select i1 %111, i32 %69, i32 1
%113 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
114: ; preds = %106
%115 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 7)
%116 = icmp eq i32 %115, 0
br i1 %116, label %117, label %122
117: ; preds = %114
%118 = tail call i64 @isdigit(i8 signext %17)
%119 = icmp eq i64 %118, 0
%120 = select i1 %119, i32 %69, i32 1
%121 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
122: ; preds = %114
%123 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 7)
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %130
125: ; preds = %122
%126 = tail call i64 @isgraph(i8 signext %17)
%127 = icmp eq i64 %126, 0
%128 = select i1 %127, i32 %69, i32 1
%129 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
130: ; preds = %122
%131 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 7)
%132 = icmp eq i32 %131, 0
br i1 %132, label %133, label %138
133: ; preds = %130
%134 = tail call i64 @islower(i8 signext %17)
%135 = icmp eq i64 %134, 0
%136 = select i1 %135, i32 %69, i32 1
%137 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
138: ; preds = %130
%139 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 7)
%140 = icmp eq i32 %139, 0
br i1 %140, label %141, label %146
141: ; preds = %138
%142 = tail call i64 @isprint(i8 signext %17)
%143 = icmp eq i64 %142, 0
%144 = select i1 %143, i32 %69, i32 1
%145 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
146: ; preds = %138
%147 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 7)
%148 = icmp eq i32 %147, 0
br i1 %148, label %149, label %154
149: ; preds = %146
%150 = tail call i64 @ispunct(i8 signext %17)
%151 = icmp eq i64 %150, 0
%152 = select i1 %151, i32 %69, i32 1
%153 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
154: ; preds = %146
%155 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 7)
%156 = icmp eq i32 %155, 0
br i1 %156, label %157, label %162
157: ; preds = %154
%158 = tail call i64 @isspace(i8 signext %17)
%159 = icmp eq i64 %158, 0
%160 = select i1 %159, i32 %69, i32 1
%161 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
162: ; preds = %154
%163 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 8)
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %170
165: ; preds = %162
%166 = tail call i64 @isxdigit(i8 signext %17)
%167 = icmp eq i64 %166, 0
%168 = select i1 %167, i32 %69, i32 1
%169 = getelementptr inbounds i8, i8* %68, i64 9
br label %185
170: ; preds = %162
br i1 %13, label %173, label %171
171: ; preds = %170
%172 = tail call signext i8 @toupper(i8 signext %17)
br label %173
173: ; preds = %170, %171
%174 = phi i8 [ %172, %171 ], [ %17, %170 ]
%175 = tail call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 7)
%176 = icmp eq i32 %175, 0
br i1 %176, label %177, label %182
177: ; preds = %173
%178 = tail call i64 @isupper(i8 signext %174)
%179 = icmp eq i64 %178, 0
%180 = select i1 %179, i32 %69, i32 1
%181 = getelementptr inbounds i8, i8* %68, i64 8
br label %185
182: ; preds = %173, %75, %72, %67
%183 = icmp eq i8 %70, %17
%184 = select i1 %183, i32 1, i32 %69
br label %185
185: ; preds = %182, %79, %177, %165, %157, %149, %141, %133, %125, %117, %109, %101, %93, %85
%186 = phi i8* [ %181, %177 ], [ %169, %165 ], [ %161, %157 ], [ %153, %149 ], [ %145, %141 ], [ %137, %133 ], [ %129, %125 ], [ %121, %117 ], [ %113, %109 ], [ %105, %101 ], [ %97, %93 ], [ %89, %85 ], [ %68, %79 ], [ %68, %182 ]
%187 = phi i32 [ %180, %177 ], [ %168, %165 ], [ %160, %157 ], [ %152, %149 ], [ %144, %141 ], [ %136, %133 ], [ %128, %125 ], [ %120, %117 ], [ %112, %109 ], [ %104, %101 ], [ %96, %93 ], [ %88, %85 ], [ %69, %79 ], [ %184, %182 ]
%188 = getelementptr inbounds i8, i8* %186, i64 1
%189 = load i8, i8* %186
%190 = icmp eq i8 %189, 93
br i1 %190, label %191, label %24
191: ; preds = %185
store i8* %188, i8** %3
%192 = icmp ne i32 %187, %9
%193 = zext i1 %192 to i32
br label %194
194: ; preds = %47, %36, %33, %191
%195 = phi i32 [ %193, %191 ], [ -1, %47 ], [ 0, %36 ], [ -1, %33 ]
ret i32 %195
}