user: 请将以下的汇编代码转换成C语言代码：

```asm
<glob_match>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rcx
  mov    %rsi,%r12
  lea    0x1(%rdi),%r13
  movzbl (%rdi),%edi
  test   %dil,%dil
  je     L486
  mov    %edx,%ebp
  lea    0x1(%rsi),%rbx
  jmp    L6
L414:
  cmp    $0x5c,%dil
  jne    L340
  lea    0x2(%rcx),%rax
  mov    %rbx,%r12
  movzbl -0x1(%rbx),%esi
  cmp    %sil,0x1(%rcx)
  jne    L115
  mov    %rax,%rcx
L76:
  lea    0x1(%rcx),%r13
  movzbl (%rcx),%edi
  add    $0x1,%rbx
  test   %dil,%dil
  je     L486
L6:
  lea    -0x1(%rbx),%rsi
  cmp    $0x5b,%dil
  je     L310
  jg     L414
  cmp    $0x2a,%dil
  je     L331
  cmp    $0x3f,%dil
  jne    L340
  mov    %rbx,%r12
  cmpb   $0x0,-0x1(%rbx)
  je     L440
  mov    %r13,%rcx
  jmp    L76
L331:
  mov    %ebp,%edx
  mov    %r13,%rdi
  call   <glob_match_after_star@plt>
L275:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L310:
  mov    %rbx,%r12
  movzbl -0x1(%rbx),%r8d
  test   %r8b,%r8b
  je     L388
  movzbl 0x1(%rcx),%edx
  cmp    $0x21,%dl
  sete   %al
  cmp    $0x5e,%dl
  sete   %dl
  add    $0x2,%rcx
  or     %dl,%al
  mov    %eax,%r9d
  cmovne %rcx,%r13
  lea    0x1(%r13),%rcx
  movzbl 0x0(%r13),%eax
  jmp    L142
L278:
  lea    0x1(%rcx),%rdx
  movzbl (%rcx),%esi
  jmp    L92
L169:
  movzbl 0x1(%rdx),%edi
  cmp    $0x5d,%dil
  je     L301
  lea    0x2(%rdx),%rax
  cmp    $0x5c,%dil
  je     L280
L338:
  test   %dil,%dil
  je     L491
  lea    0x1(%rax),%rcx
  movzbl (%rax),%eax
  jmp    L235
L280:
  lea    0x3(%rdx),%rax
  movzbl 0x2(%rdx),%edi
  jmp    L338
L301:
  mov    %esi,%edi
  jmp    L235
L131:
  cmp    $0x5d,%al
  je     L204
L142:
  cmp    $0x5c,%al
  je     L278
  test   %al,%al
  je     L453
  mov    %eax,%esi
  mov    %rcx,%rdx
L92:
  lea    0x1(%rdx),%rcx
  movzbl (%rdx),%eax
  mov    %esi,%edi
  cmp    $0x2d,%al
  je     L169
L235:
  cmp    %r8b,%sil
  jg     L131
  cmp    %r8b,%dil
  jl     L131
  cmp    $0x5d,%al
  je     L454
  test   %al,%al
  jne    L67
  mov    $0x0,%eax
  jmp    L275
L204:
  test   %r9b,%r9b
  jne    L76
  mov    $0x0,%eax
  jmp    L275
L176:
  add    $0x2,%rcx
L67:
  movzbl (%rcx),%eax
  test   %al,%al
  je     L291
  cmp    $0x5c,%al
  je     L176
  add    $0x1,%rcx
  cmp    $0x5d,%al
  jne    L67
L454:
  test   %r9b,%r9b
  je     L76
  mov    $0x0,%eax
  jmp    L275
L340:
  test   %ebp,%ebp
  je     L363
  mov    %rbx,%r12
  cmp    %dil,-0x1(%rbx)
  jne    L26
  mov    %r13,%rcx
  jmp    L76
L363:
  movsbl %dil,%edi
  call   <tolower@plt>
  mov    %eax,%r14d
  mov    %rbx,%r12
  movsbl -0x1(%rbx),%edi
  call   <tolower@plt>
  cmp    %eax,%r14d
  jne    L65
  mov    %r13,%rcx
  jmp    L76
L486:
  cmpb   $0x0,(%r12)
  sete   %al
  movzbl %al,%eax
  jmp    L275
L440:
  mov    $0x0,%eax
  jmp    L275
L115:
  mov    $0x0,%eax
  jmp    L275
L388:
  mov    $0x0,%eax
  jmp    L275
L453:
  mov    $0x0,%eax
  jmp    L275
L491:
  mov    $0x0,%eax
  jmp    L275
L291:
  mov    $0x0,%eax
  jmp    L275
L26:
  mov    $0x0,%eax
  jmp    L275
L65:
  mov    %ebp,%eax
  jmp    L275
```

assistant: ```c
int glob_match(const char *pattern, const char *text, const int casecmp) {
  register const char *p = pattern, *t = text;
  register char c;
  while ((c = *p++) != '\0')
    switch (c) {
    case '?':
      if (*t == '\0')
        return 0;
      else
        ++t;
      break;
    case '\\':
      if (*p++ != *t++)
        return 0;
      break;
    case '*':
      return glob_match_after_star(p, t, casecmp);
    case '[': {
      register char c1 = *t++;
      int invert;
      if (!c1)
        return (0);
      invert = ((*p == '!') || (*p == '^'));
      if (invert)
        p++;
      c = *p++;
      while (1) {
        register char cstart = c, cend = c;
        if (c == '\\') {
          cstart = *p++;
          cend = cstart;
        }
        if (c == '\0')
          return 0;
        c = *p++;
        if (c == '-' && *p != ']') {
          cend = *p++;
          if (cend == '\\')
            cend = *p++;
          if (cend == '\0')
            return 0;
          c = *p++;
        }
        if (c1 >= cstart && c1 <= cend)
          goto match;
        if (c == ']')
          break;
      }
      if (!invert)
        return 0;
      break;
    match:
      while (c != ']') {
        if (c == '\0')
          return 0;
        c = *p++;
        if (c == '\0')
          return 0;
        else if (c == '\\')
          ++p;
      }
      if (invert)
        return 0;
      break;
    }
    default:
      if (casecmp) {
        if (c != *t++)
          return 0;
      } else {
        if (tolower(c) != tolower(*t))
          return 0;
        t++;
      }
    }
  return *t == '\0';
}
```