user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<has_globbing>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L368
L33:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7,%al
  jne    L80
  addq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x2a,-0x14(%rbp)
  je     L124
  cmpl   $0x3f,-0x14(%rbp)
  jne    L87
L124:
  movl   $0x1,-0x1c(%rbp)
  jmp    L165
L87:
  cmpl   $0x5b,-0x14(%rbp)
  jne    L246
  cmpl   $0x0,-0x18(%rbp)
  jne    L165
  movl   $0x1,-0x1c(%rbp)
  movl   $0x1,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x7,%al
  jne    L169
  mov    -0x10(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x21,%al
  jne    L169
  addq   $0x2,-0x10(%rbp)
L169:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x7,%al
  jne    L165
  mov    -0x10(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L165
  addq   $0x2,-0x10(%rbp)
  jmp    L165
L246:
  cmpl   $0x5d,-0x14(%rbp)
  jne    L152
  cmpl   $0x0,-0x18(%rbp)
  je     L165
  cmpl   $0x0,-0x20(%rbp)
  je     L71
  mov    $0x0,%eax
  jmp    L239
L71:
  movl   $0x0,-0x18(%rbp)
  jmp    L165
L152:
  mov    -0x14(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L268
  mov    -0x14(%rbp),%eax
  and    $0x7f,%eax
  mov    %eax,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L268
  movl   $0x1,-0x1c(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  je     L254
  addl   $0x1,-0x20(%rbp)
  jmp    L165
L254:
  addl   $0x1,-0x24(%rbp)
  jmp    L165
L268:
  cmpl   $0x7c,-0x14(%rbp)
  jne    L338
  cmpl   $0x0,-0x18(%rbp)
  je     L165
  cmpl   $0x0,-0x20(%rbp)
  jne    L165
  mov    $0x0,%eax
  jmp    L239
L338:
  cmpl   $0x29,-0x14(%rbp)
  jne    L165
  cmpl   $0x0,-0x18(%rbp)
  je     L60
  mov    -0x20(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x20(%rbp)
  test   %eax,%eax
  jne    L165
  mov    $0x0,%eax
  jmp    L239
L60:
  cmpl   $0x0,-0x24(%rbp)
  je     L165
  subl   $0x1,-0x24(%rbp)
  jmp    L165
L80:
  nop
L165:
  addq   $0x1,-0x10(%rbp)
L368:
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jb     L33
  cmpl   $0x0,-0x1c(%rbp)
  je     L242
  cmpl   $0x0,-0x18(%rbp)
  jne    L242
  cmpl   $0x0,-0x24(%rbp)
  jne    L242
  mov    $0x1,%eax
  jmp    L239
L242:
  mov    $0x0,%eax
L239:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D0
type_guessed: string

tool: D0: *+?@! 

assistant: ```c
int has_globbing(xp, xpe) const char *xp, *xpe;
{
  const unsigned char *p = (const unsigned char *)xp;
  const unsigned char *pe = (const unsigned char *)xpe;
  int c;
  int nest = 0, bnest = 0;
  int saw_glob = 0;
  int in_bracket = 0;
  for (; p < pe; p++) {
    if (!((unsigned char)(*p) == (7)))
      continue;
    if ((c = *++p) == '*' || c == '?')
      saw_glob = 1;
    else if (c == '[') {
      if (!in_bracket) {
        saw_glob = 1;
        in_bracket = 1;
        if (((unsigned char)(p[1]) == (7)) && p[2] == '!')
          p += 2;
        if (((unsigned char)(p[1]) == (7)) && p[2] == ']')
          p += 2;
      }
    } else if (c == ']') {
      if (in_bracket) {
        if (bnest)
          return 0;
        in_bracket = 0;
      }
    } else if ((c & 0x80) && strchr("*+?@! ", c & 0x7f)) {
      saw_glob = 1;
      if (in_bracket)
        bnest++;
      else
        nest++;
    } else if (c == '|') {
      if (in_bracket && !bnest)
        return 0;
    } else if (c == ')') {
      if (in_bracket) {
        if (!bnest--)
          return 0;
      } else if (nest)
        nest--;
    }
  }
  return saw_glob && !in_bracket && !nest;
}
```