user: Translate the below assembly code into C programming language:

```asm
<glob_match>:
  endbr64
  push   %r12
  mov    %rsi,%r11
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  movzbl (%rdi),%edx
  test   %dl,%dl
  je     L242
  mov    %rdi,%rax
  lea    0x1(%rdi),%r10
  lea    0x1(%rsi),%r9
  mov    %rsi,%r8
L376:
  cmp    $0x5b,%dl
  je     L301
  jg     L96
  cmp    $0x2a,%dl
  je     L39
  cmp    $0x3f,%dl
  jne    L295
  movzbl (%r8),%eax
  test   %al,%al
  je     L234
  test   %ebx,%ebx
  setne  %cl
  cmp    %r11,%r8
  sete   %dl
  test   %dl,%cl
  je     L379
  cmp    $0x2e,%al
  je     L234
L379:
  mov    %r9,%rbp
  mov    %r10,%rax
L244:
  movzbl (%rax),%edx
  lea    0x1(%rax),%r10
  add    $0x1,%r8
  add    $0x1,%r9
  test   %dl,%dl
  jne    L376
L344:
  xor    %eax,%eax
  cmpb   $0x0,0x0(%rbp)
  sete   %al
  jmp    L345
  nopl   (%rax)
L96:
  cmp    $0x5c,%dl
  jne    L295
  movzbl (%r8),%edi
  lea    0x2(%rax),%rdx
  mov    %r9,%rbp
  cmp    %dil,0x1(%rax)
  jne    L234
  mov    %rdx,%rax
  jmp    L244
  nopl   0x0(%rax,%rax,1)
L301:
  movzbl (%r8),%edi
  mov    %r9,%rbp
  test   %dil,%dil
  je     L234
  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    L203
  nop
L157:
  test   %dl,%dl
  je     L234
  mov    %edx,%ecx
  movzbl (%rax),%edx
  cmp    $0x2d,%dl
  je     L375
L79:
  add    $0x1,%rax
  mov    %ecx,%esi
L33:
  cmp    %cl,%dil
  jl     L204
  cmp    %dil,%sil
  jge    L235
L204:
  cmp    $0x5d,%dl
  je     L264
L203:
  cmp    $0x5c,%dl
  jne    L157
  movzbl (%rax),%ecx
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x2d,%dl
  jne    L79
L375:
  movzbl 0x1(%rax),%esi
  lea    0x2(%rax),%rdx
  cmp    $0x5c,%sil
  jne    L267
  movzbl 0x2(%rax),%esi
  lea    0x3(%rax),%rdx
L267:
  test   %sil,%sil
  je     L234
  lea    0x1(%rdx),%rax
  movzbl (%rdx),%edx
  jmp    L33
L116:
  add    $0x2,%rax
  nopl   0x0(%rax,%rax,1)
L139:
  test   %dl,%dl
  je     L234
  movzbl (%rax),%edx
  lea    0x1(%rax),%rcx
  test   %dl,%dl
  je     L234
  cmp    $0x5c,%dl
  je     L116
  mov    %rcx,%rax
L235:
  cmp    $0x5d,%dl
  jne    L139
  test   %r12b,%r12b
  je     L244
  nopl   (%rax)
L234:
  xor    %eax,%eax
L345:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nop
L295:
  mov    %r9,%rbp
  cmp    %dl,(%r8)
  jne    L234
  mov    %r10,%rax
  jmp    L244
L39:
  test   %ebx,%ebx
  je     L146
  cmp    %r8,%r11
  jne    L146
  cmpb   $0x2e,(%r8)
  je     L234
L146:
  pop    %rbx
  mov    %r8,%rsi
  pop    %rbp
  mov    %r10,%rdi
  xor    %eax,%eax
  pop    %r12
  jmp    1050 <glob_match_after_star@plt>
L264:
  test   %r12b,%r12b
  jne    L244
  jmp    L234
L242:
  mov    %rsi,%rbp
  jmp    L344
```

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';
}
```