user: Please show me the C implementation that matches the assembly code listed below:

```asm
<glob_match>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    -0x48(%rbp),%rbx
  mov    -0x50(%rbp),%r12
  jmp    L232
L290:
  movsbl %r13b,%eax
  cmp    $0x5c,%eax
  je     L272
  cmp    $0x5c,%eax
  jg     L393
  cmp    $0x5b,%eax
  je     L405
  cmp    $0x5b,%eax
  jg     L393
  cmp    $0x2a,%eax
  je     L304
  cmp    $0x3f,%eax
  jne    L393
  movzbl (%r12),%eax
  test   %al,%al
  je     L22
  cmpl   $0x0,-0x54(%rbp)
  je     L486
  cmp    -0x50(%rbp),%r12
  jne    L486
  movzbl (%r12),%eax
  cmp    $0x2e,%al
  jne    L486
L22:
  mov    $0x0,%eax
  jmp    L292
L486:
  add    $0x1,%r12
  jmp    L232
L272:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%edx
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L232
  mov    $0x0,%eax
  jmp    L292
L304:
  cmpl   $0x0,-0x54(%rbp)
  je     L321
  cmp    -0x50(%rbp),%r12
  jne    L321
  movzbl (%r12),%eax
  cmp    $0x2e,%al
  jne    L321
  mov    $0x0,%eax
  jmp    L292
L321:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <glob_match_after_star@plt>
  jmp    L292
L405:
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movzbl (%rax),%r15d
  test   %r15b,%r15b
  jne    L36
  mov    $0x0,%eax
  jmp    L292
L36:
  movzbl (%rbx),%eax
  cmp    $0x21,%al
  je     L239
  movzbl (%rbx),%eax
  cmp    $0x5e,%al
  jne    L245
L239:
  mov    $0x1,%eax
  jmp    L431
L245:
  mov    $0x0,%eax
L431:
  mov    %eax,-0x34(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  je     L378
  add    $0x1,%rbx
L378:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r13d
L371:
  mov    %r13d,%ecx
  mov    %r13d,%r14d
  cmp    $0x5c,%r13b
  jne    L37
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%eax
  mov    %eax,%ecx
  mov    %eax,%r14d
L37:
  test   %r13b,%r13b
  jne    L225
  mov    $0x0,%eax
  jmp    L292
L225:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r13d
  cmp    $0x2d,%r13b
  jne    L313
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r14d
  cmp    $0x5c,%r14b
  jne    L57
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r14d
L57:
  test   %r14b,%r14b
  jne    L300
  mov    $0x0,%eax
  jmp    L292
L300:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r13d
L313:
  mov    %ecx,%eax
  cmp    %al,%r15b
  jl     L50
  cmp    %r14b,%r15b
  jle    L47
L50:
  cmp    $0x5d,%r13b
  je     L403
  jmp    L371
L403:
  nop
  cmpl   $0x0,-0x34(%rbp)
  jne    L232
  mov    $0x0,%eax
  jmp    L292
L47:
  nop
  jmp    L506
L173:
  test   %r13b,%r13b
  jne    L367
  mov    $0x0,%eax
  jmp    L292
L367:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r13d
  test   %r13b,%r13b
  jne    L49
  mov    $0x0,%eax
  jmp    L292
L49:
  cmp    $0x5c,%r13b
  jne    L506
  add    $0x1,%rbx
L506:
  cmp    $0x5d,%r13b
  jne    L173
  cmpl   $0x0,-0x34(%rbp)
  je     L232
  mov    $0x0,%eax
  jmp    L292
L393:
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movzbl (%rax),%eax
  cmp    %al,%r13b
  je     L232
  mov    $0x0,%eax
  jmp    L292
L232:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r13d
  test   %r13b,%r13b
  jne    L290
  movzbl (%r12),%eax
  test   %al,%al
  sete   %al
  movzbl %al,%eax
L292:
  add    $0x38,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

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