user: 请从给定的汇编指令推导出C源代码：

```asm
<rangematch>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %edx,%r15d
  mov    %rcx,(%rsp)
  mov    %esi,%r14d
  movzbl (%rdi),%eax
  cmp    $0x21,%al
  sete   %dl
  cmp    $0x5e,%al
  sete   %al
  or     %eax,%edx
  mov    %dl,0xe(%rsp)
  cmp    $0x1,%dl
  sbb    $0xffffffffffffffff,%rbx
  mov    %r15d,%eax
  and    $0x10,%eax
  mov    %eax,0x8(%rsp)
  jne    L617
L64:
  lea    0x1(%rbx),%rbp
  movzbl (%rbx),%ebx
  mov    $0x0,%r12d
  jmp    L19
L617:
  movzbl %sil,%edi
  call   <tolower@plt>
  mov    %eax,%r14d
  jmp    L64
L114:
  test   $0x1,%r15b
  jne    L196
  movzbl 0x0(%rbp),%ebx
  lea    0x1(%rbp),%rbp
  jmp    L160
L253:
  test   $0x2,%r15b
  jne    L69
  mov    %rbp,%rax
  cmpb   $0x2d,0x0(%rbp)
  jne    L505
L536:
  movzbl 0x1(%rbp),%r13d
  cmp    $0x5d,%r13b
  je     L404
  test   %r13b,%r13b
  jne    L335
L404:
  mov    %rbp,%rax
L505:
  cmp    %bl,%r14b
  mov    $0x1,%edx
  cmove  %edx,%r12d
L166:
  lea    0x1(%rax),%rbp
  movzbl (%rax),%ebx
  cmp    $0x5d,%bl
  je     L79
L19:
  cmp    $0x5c,%bl
  je     L114
L160:
  test   %bl,%bl
  je     L498
  cmp    $0x2f,%bl
  je     L253
  cmpb   $0x2d,0x0(%rbp)
  je     L536
L383:
  cmp    $0x5b,%bl
  jne    L159
  movzbl 0x0(%rbp),%edx
  mov    %rbp,%rax
  cmp    $0x3a,%dl
  jne    L505
  cmpb   $0x0,0x1(%rbp)
  jne    L182
  cmp    $0x5b,%r14b
  je     L221
  movzbl 0x0(%rbp),%ebx
  lea    0x1(%rbp),%rbp
  jmp    L19
L335:
  lea    0x2(%rbp),%rax
  cmp    $0x5c,%r13b
  je     L35
L517:
  mov    %rax,%rbp
L604:
  cmpl   $0x0,0x8(%rsp)
  jne    L174
L421:
  cmp    %r13b,%bl
  jle    L559
  mov    %ebx,%eax
  mov    %r13d,%ebx
  mov    %eax,%r13d
L559:
  cmp    %bl,%r14b
  jl     L383
  cmp    %r13b,%r14b
  mov    $0x1,%eax
  cmovle %eax,%r12d
  jmp    L383
L35:
  test   $0x1,%r15b
  jne    L517
  lea    0x3(%rbp),%rax
  movzbl 0x2(%rbp),%r13d
  test   %r13b,%r13b
  je     L322
  mov    %rax,%rbp
  jmp    L604
L174:
  movzbl %bl,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  movzbl %r13b,%edi
  call   <tolower@plt>
  mov    %eax,%r13d
  jmp    L421
L182:
  lea    0x1(%rbp),%r13
  mov    $0x2,%edx
  lea    D1(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    %rbp,%rax
  test   %edx,%edx
  je     L166
  mov    $0x7,%edx
  lea    D60(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L605
  mov    $0x7,%edx
  lea    D59(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L101
  mov    $0x7,%edx
  lea    D45(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L343
  mov    $0x7,%edx
  lea    D21(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L574
  mov    $0x7,%edx
  lea    D80(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L326
  mov    $0x7,%edx
  lea    D34(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L402
  mov    $0x7,%edx
  lea    D17(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L229
  mov    $0x7,%edx
  lea    D22(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L321
  mov    $0x7,%edx
  lea    D67(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L578
  mov    $0x7,%edx
  lea    D126(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L265
  mov    $0x8,%edx
  lea    D90(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L425
  mov    %r14b,0xf(%rsp)
  cmpl   $0x0,0x8(%rsp)
  jne    L549
L333:
  mov    $0x7,%edx
  lea    D77(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    %rbp,%rax
  test   %edx,%edx
  jne    L505
  movsbl 0xf(%rsp),%edi
  call   <isupper@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L605:
  movsbl %r14b,%edi
  call   <isalnum@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L101:
  movsbl %r14b,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L343:
  movsbl %r14b,%edi
  call   <isblank@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L574:
  movsbl %r14b,%edi
  call   <iscntrl@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L326:
  movsbl %r14b,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L402:
  movsbl %r14b,%edi
  call   <isgraph@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L229:
  movsbl %r14b,%edi
  call   <islower@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L321:
  movsbl %r14b,%edi
  call   <isprint@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L578:
  movsbl %r14b,%edi
  call   <ispunct@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L265:
  movsbl %r14b,%edi
  call   <isspace@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x8(%rbp),%rax
  jmp    L166
L425:
  movsbl %r14b,%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovne %eax,%r12d
  lea    0x9(%rbp),%rax
  jmp    L166
L549:
  movsbl %r14b,%edi
  call   <toupper@plt>
  mov    %al,0xf(%rsp)
  jmp    L333
L159:
  mov    %rbp,%rax
  jmp    L505
L79:
  mov    (%rsp),%rax
  mov    %rbp,(%rax)
  movzbl 0xe(%rsp),%eax
  cmp    %r12d,%eax
  setne  %al
  movzbl %al,%eax
  jmp    L140
L498:
  mov    $0xffffffff,%eax
L140:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L69:
  mov    $0x0,%eax
  jmp    L140
L322:
  mov    $0xffffffff,%eax
  jmp    L140
L221:
  add    $0x1,%rbp
  mov    %edx,%ebx
  mov    $0x1,%r12d
  jmp    L19
L196:
  mov    %rbp,%rax
  cmpb   $0x2d,0x0(%rbp)
  jne    L505
  jmp    L536
```

tool_calls: name: retrieve_data
arguments: tag: D1
data_type: string
name: retrieve_data
arguments: tag: D60
data_type: string
name: retrieve_data
arguments: tag: D59
data_type: string
name: retrieve_data
arguments: tag: D45
data_type: string
name: retrieve_data
arguments: tag: D21
data_type: string
name: retrieve_data
arguments: tag: D80
data_type: string
name: retrieve_data
arguments: tag: D34
data_type: string
name: retrieve_data
arguments: tag: D17
data_type: string
name: retrieve_data
arguments: tag: D22
data_type: string
name: retrieve_data
arguments: tag: D67
data_type: string
name: retrieve_data
arguments: tag: D126
data_type: string
name: retrieve_data
arguments: tag: D90
data_type: string
name: retrieve_data
arguments: tag: D77
data_type: string

tool: D1: :]

tool: D60: alnum:]

tool: D59: alpha:]

tool: D45: blank:]

tool: D21: cntrl:]

tool: D80: digit:]

tool: D34: graph:]

tool: D17: lower:]

tool: D22: print:]

tool: D67: punct:]

tool: D126: space:]

tool: D90: xdigit:]

tool: D77: upper:]

assistant: ```c
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;
}
```