user: What would the C source look like for the assembly code provided here?

```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),%r13
  jmp    L187
L292:
  movsbl %r12b,%eax
  cmp    $0x5c,%eax
  je     L131
  cmp    $0x5c,%eax
  jg     L189
  cmp    $0x5b,%eax
  je     L11
  cmp    $0x5b,%eax
  jg     L189
  cmp    $0x2a,%eax
  je     L166
  cmp    $0x3f,%eax
  jne    L189
  movzbl 0x0(%r13),%eax
  test   %al,%al
  jne    L55
  mov    $0x0,%eax
  jmp    L420
L55:
  add    $0x1,%r13
  jmp    L187
L131:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%edx
  mov    %r13,%rax
  lea    0x1(%rax),%r13
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L187
  mov    $0x0,%eax
  jmp    L420
L166:
  mov    -0x54(%rbp),%eax
  mov    %eax,%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <glob_match_after_star@plt>
  jmp    L420
L11:
  mov    %r13,%rax
  lea    0x1(%rax),%r13
  movzbl (%rax),%r15d
  test   %r15b,%r15b
  jne    L146
  mov    $0x0,%eax
  jmp    L420
L146:
  movzbl (%rbx),%eax
  cmp    $0x21,%al
  je     L28
  movzbl (%rbx),%eax
  cmp    $0x5e,%al
  jne    L194
L28:
  mov    $0x1,%eax
  jmp    L470
L194:
  mov    $0x0,%eax
L470:
  mov    %eax,-0x34(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  je     L202
  add    $0x1,%rbx
L202:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r12d
L234:
  mov    %r12d,%ecx
  mov    %r12d,%r14d
  cmp    $0x5c,%r12b
  jne    L318
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%eax
  mov    %eax,%ecx
  mov    %eax,%r14d
L318:
  test   %r12b,%r12b
  jne    L231
  mov    $0x0,%eax
  jmp    L420
L231:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r12d
  cmp    $0x2d,%r12b
  jne    L416
  movzbl (%rbx),%eax
  cmp    $0x5d,%al
  je     L416
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r14d
  cmp    $0x5c,%r14b
  jne    L186
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r14d
L186:
  test   %r14b,%r14b
  jne    L289
  mov    $0x0,%eax
  jmp    L420
L289:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r12d
L416:
  mov    %ecx,%eax
  cmp    %al,%r15b
  jl     L320
  cmp    %r14b,%r15b
  jle    L427
L320:
  cmp    $0x5d,%r12b
  je     L195
  jmp    L234
L195:
  nop
  cmpl   $0x0,-0x34(%rbp)
  jne    L187
  mov    $0x0,%eax
  jmp    L420
L427:
  nop
  jmp    L463
L152:
  test   %r12b,%r12b
  jne    L271
  mov    $0x0,%eax
  jmp    L420
L271:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r12d
  test   %r12b,%r12b
  jne    L42
  mov    $0x0,%eax
  jmp    L420
L42:
  cmp    $0x5c,%r12b
  jne    L463
  add    $0x1,%rbx
L463:
  cmp    $0x5d,%r12b
  jne    L152
  cmpl   $0x0,-0x34(%rbp)
  je     L187
  mov    $0x0,%eax
  jmp    L420
L189:
  cmpl   $0x0,-0x54(%rbp)
  je     L402
  mov    %r13,%rax
  lea    0x1(%rax),%r13
  movzbl (%rax),%eax
  cmp    %al,%r12b
  je     L187
  mov    $0x0,%eax
  jmp    L420
L402:
  movsbl %r12b,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%r12d
  movzbl 0x0(%r13),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %eax,%r12d
  je     L34
  mov    $0x0,%eax
  jmp    L420
L34:
  add    $0x1,%r13
L187:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%r12d
  test   %r12b,%r12b
  jne    L292
  movzbl 0x0(%r13),%eax
  test   %al,%al
  sete   %al
  movzbl %al,%eax
L420:
  add    $0x38,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

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