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

```asm
<glob_match>:
  endbr64
  push   %r12
  mov    %rsi,%r11
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  movzbl (%rdi),%edx
  test   %dl,%dl
  je     L339
  mov    %rdi,%rax
  lea    0x1(%rdi),%r10
  lea    0x1(%rsi),%r9
  mov    %rsi,%r8
L366:
  cmp    $0x5b,%dl
  je     L61
  jg     L33
  cmp    $0x2a,%dl
  je     L329
  cmp    $0x3f,%dl
  jne    L135
  movzbl (%r8),%eax
  test   %al,%al
  je     L121
  test   %ebx,%ebx
  setne  %cl
  cmp    %r11,%r8
  sete   %dl
  test   %dl,%cl
  je     L313
  cmp    $0x2e,%al
  je     L121
L313:
  mov    %r9,%rbp
  mov    %r10,%rax
L223:
  movzbl (%rax),%edx
  lea    0x1(%rax),%r10
  add    $0x1,%r8
  add    $0x1,%r9
  test   %dl,%dl
  jne    L366
L191:
  xor    %eax,%eax
  cmpb   $0x0,0x0(%rbp)
  sete   %al
  jmp    L314
  nopl   (%rax)
L33:
  cmp    $0x5c,%dl
  jne    L135
  movzbl (%r8),%edi
  lea    0x2(%rax),%rdx
  mov    %r9,%rbp
  cmp    %dil,0x1(%rax)
  jne    L121
  mov    %rdx,%rax
  jmp    L223
  nopl   0x0(%rax,%rax,1)
L61:
  movzbl (%r8),%edi
  mov    %r9,%rbp
  test   %dil,%dil
  je     L121
  movzbl 0x1(%rax),%ecx
  cmp    $0x21,%cl
  sete   %dl
  cmp    $0x5e,%cl
  sete   %cl
  add    $0x2,%rax
  or     %cl,%dl
  cmovne %rax,%r10
  mov    %edx,%r12d
  lea    0x1(%r10),%rax
  movzbl (%r10),%edx
  jmp    L256
  nop
L45:
  test   %dl,%dl
  je     L121
  mov    %edx,%ecx
  movzbl (%rax),%edx
  cmp    $0x2d,%dl
  je     L125
L240:
  add    $0x1,%rax
  mov    %ecx,%esi
L183:
  cmp    %cl,%dil
  jl     L181
  cmp    %dil,%sil
  jge    L305
L181:
  cmp    $0x5d,%dl
  je     L289
L256:
  cmp    $0x5c,%dl
  jne    L45
  movzbl (%rax),%ecx
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x2d,%dl
  jne    L240
L125:
  movzbl 0x1(%rax),%esi
  lea    0x2(%rax),%rdx
  cmp    $0x5c,%sil
  jne    L95
  movzbl 0x2(%rax),%esi
  lea    0x3(%rax),%rdx
L95:
  test   %sil,%sil
  je     L121
  lea    0x1(%rdx),%rax
  movzbl (%rdx),%edx
  jmp    L183
L235:
  add    $0x2,%rax
  nopl   0x0(%rax,%rax,1)
L136:
  test   %dl,%dl
  je     L121
  movzbl (%rax),%edx
  lea    0x1(%rax),%rcx
  test   %dl,%dl
  je     L121
  cmp    $0x5c,%dl
  je     L235
  mov    %rcx,%rax
L305:
  cmp    $0x5d,%dl
  jne    L136
  test   %r12b,%r12b
  je     L223
  nopl   (%rax)
L121:
  xor    %eax,%eax
L314:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nop
L135:
  mov    %r9,%rbp
  cmp    %dl,(%r8)
  jne    L121
  mov    %r10,%rax
  jmp    L223
L329:
  test   %ebx,%ebx
  je     L264
  cmp    %r8,%r11
  jne    L264
  cmpb   $0x2e,(%r8)
  je     L121
L264:
  pop    %rbx
  mov    %r8,%rsi
  pop    %rbp
  mov    %r10,%rdi
  xor    %eax,%eax
  pop    %r12
  jmp    1050 <glob_match_after_star@plt>
L289:
  test   %r12b,%r12b
  jne    L223
  jmp    L121
L339:
  mov    %rsi,%rbp
  jmp    L191
```

assistant: ```c
int glob_match(pattern, text, dot_special)
char *pattern, *text;
int dot_special;
{
  register char *p = pattern, *t = text;
  register char c;
  while ((c = *p++) != '\0')
    switch (c) {
    case '?':
      if (*t == '\0' || (dot_special && t == text && *t == '.'))
        return 0;
      else
        ++t;
      break;
    case '\\':
      if (*p++ != *t++)
        return 0;
      break;
    case '*':
      if (dot_special && t == text && *t == '.')
        return 0;
      return glob_match_after_star(p, t);
    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 == '-') {
          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 (c != *t++)
        return 0;
    }
  return *t == '\0';
}
```