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

```asm
<glob>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L310:
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x5c,%eax
  je     L155
  cmp    $0x5c,%eax
  jg     L411
  cmp    $0x5b,%eax
  je     L428
  cmp    $0x5b,%eax
  jg     L411
  cmp    $0x3f,%eax
  je     L57
  cmp    $0x3f,%eax
  jg     L411
  test   %eax,%eax
  je     L247
  cmp    $0x2a,%eax
  je     L235
  jmp    L411
L247:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L101
  mov    $0xffffffff,%eax
  jmp    L366
L101:
  mov    $0x0,%eax
  jmp    L366
L57:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L189
  mov    $0x1,%eax
  jmp    L366
L428:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x28(%rbp)
L1:
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L389
  mov    $0x1,%eax
  jmp    L366
L389:
  mov    -0x28(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  je     L1
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L1
  addq   $0x1,-0x38(%rbp)
  lea    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <globchars@plt>
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  shr    $0x3,%al
  movzbl %al,%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movsbl %al,%edx
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L414
  mov    $0x1,%eax
  jmp    L366
L414:
  addq   $0x1,-0x40(%rbp)
  jmp    L249
L235:
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L238
L297:
  addq   $0x1,-0x40(%rbp)
L238:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L297
  jmp    L344
L79:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L311
  mov    -0x40(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <glob>
  jmp    L372
L311:
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L216
  mov    $0xffffffff,%eax
  jmp    L372
L216:
  mov    $0x0,%eax
L372:
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jne    L395
  mov    $0x0,%eax
  jmp    L366
L395:
  cmpl   $0x0,-0x2c(%rbp)
  jns    L221
  mov    $0x1,%eax
  jmp    L366
L221:
  subq   $0x1,-0x40(%rbp)
L344:
  mov    -0x40(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jne    L79
  jmp    L249
L155:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L201
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movzbl (%rax),%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  cmp    %al,%cl
  je     L284
L201:
  mov    $0x1,%eax
  jmp    L366
L411:
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movzbl (%rax),%edx
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L400
  mov    $0x1,%eax
  jmp    L366
L189:
  nop
  jmp    L310
L284:
  nop
  jmp    L310
L400:
  nop
L249:
  jmp    L310
L366:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L169
  call   <__stack_chk_fail@plt>
L169:
  leave
  ret
```

assistant: ```c
int glob(const char *c, const char *s) {
  char bitlist[16];
  const char *here;
  for (;;)
    switch (*c++) {
    case '\0':
      return *s ? -1 : 0;
    case '?':
      if (!*s++)
        return 1;
      break;
    case '[':
      here = c;
      do
        if (!*c++)
          return 1;
      while ((here == c) || (*c != ']'));
      ++c;
      globchars(here, c, bitlist);
      if (!(bitlist[(*(const unsigned char *)s) / 8] & (1 << ((*(const unsigned char *)s) % 8))))
        return 1;
      ++s;
      break;
    case '*':
      here = s;
      while (*s)
        ++s;
      while (s != here) {
        int r;
        r = *c ? glob(c, s) : *s ? -1 : 0;
        if (!r)
          return 0;
        if (r < 0)
          return 1;
        --s;
      }
      break;
    case '\\':
      if (!*c || (*s++ != *c++))
        return 1;
      break;
    default:
      if (*s++ != c[-1])
        return 1;
      break;
    }
}
```