user: What is the c source code of the assembly code below?

```asm
<ms_globmatch>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  movsbl (%rsi),%eax
  test   %al,%al
  je     L57
L77:
  movsbl 0x0(%rbp),%edx
  test   %dl,%dl
  jne    L199
  cmp    $0x2a,%al
  jne    L482
  lea    0x1(%rsi),%rbx
L566:
  movzbl (%rbx),%ecx
  cmp    $0x2a,%cl
  jne    L528
  nopl   0x0(%rax)
L282:
  movzbl 0x1(%rbx),%ecx
  add    $0x1,%rbx
  cmp    $0x2a,%cl
  je     L282
L528:
  mov    $0x1,%eax
  test   %cl,%cl
  je     L458
  lea    -0x5b(%rcx),%eax
  cmp    $0x1,%al
  jbe    L186
  cmp    $0x3f,%cl
  jne    L366
L186:
  test   %dl,%dl
  je     L482
  cs nopw 0x0(%rax,%rax,1)
L490:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <ms_globmatch>
  test   %eax,%eax
  jne    L78
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  jne    L490
L458:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L199:
  lea    0x1(%rsi),%rbx
  cmp    $0x3f,%al
  je     L243
  jle    L146
  cmp    $0x5b,%al
  je     L287
  cmp    $0x5c,%al
  jne    L279
  movsbl 0x1(%rsi),%eax
  add    $0x2,%rsi
  test   %al,%al
  je     L120
L0:
  cmp    %eax,%edx
  jne    L482
L173:
  movsbl (%rsi),%eax
  add    $0x1,%rbp
  test   %al,%al
  jne    L77
L57:
  xor    %eax,%eax
  cmpb   $0x0,0x0(%rbp)
  sete   %al
  jmp    L458
L146:
  cmp    $0x2a,%al
  je     L566
L279:
  mov    %rbx,%rsi
  jmp    L0
  nopl   (%rax)
L287:
  movzbl 0x1(%rsi),%edi
  lea    0x2(%rsi),%rax
  cmp    $0x5e,%dil
  je     L356
  test   %dil,%dil
  je     L482
  xor    %r8d,%r8d
  jmp    L289
L328:
  cmp    %dil,%dl
  je     L82
  cmp    $0x5d,%cl
  je     L100
  cmp    %cl,%dl
  je     L82
  movzbl (%rax),%edi
  lea    0x1(%rax),%rcx
  test   %dil,%dil
  je     L375
L34:
  mov    %rax,%rbx
  mov    %rcx,%rax
L289:
  movzbl 0x1(%rbx),%ecx
  test   %cl,%cl
  je     L482
L246:
  cmp    $0x2d,%cl
  jne    L328
  movzbl 0x2(%rbx),%esi
  lea    0x2(%rbx),%rax
  test   %sil,%sil
  je     L482
  cmp    $0x5d,%sil
  je     L446
  cmp    %dil,%dl
  je     L82
  cmp    %sil,%dl
  je     L82
  cmp    %dil,%dl
  jle    L311
  cmp    %sil,%dl
  jl     L82
L311:
  lea    0x3(%rbx),%rcx
  mov    %esi,%edi
  jmp    L34
  nopl   0x0(%rax)
L243:
  mov    %rbx,%rsi
  jmp    L173
L120:
  mov    %rbx,%rsi
  mov    $0x5c,%eax
  jmp    L0
  nopl   (%rax)
L356:
  movzbl 0x2(%rsi),%edi
  lea    0x3(%rsi),%rcx
  test   %dil,%dil
  je     L372
  mov    %rax,%rbx
  mov    %rcx,%rax
  mov    $0x1,%r8d
  movzbl 0x1(%rbx),%ecx
  test   %cl,%cl
  jne    L246
  nopl   (%rax)
L482:
  xor    %eax,%eax
L320:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L82:
  mov    $0x1,%edx
L179:
  cmp    %r8d,%edx
  jne    L278
  jmp    L482
  nopl   0x0(%rax)
L513:
  add    $0x1,%rax
L278:
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L21
  cmp    $0x5d,%dl
  jne    L513
L21:
  lea    0x1(%rax),%rsi
  test   %dl,%dl
  jne    L173
  xor    %eax,%eax
  jmp    L320
  nopl   0x0(%rax,%rax,1)
L366:
  cmp    %cl,%dl
  je     L186
  test   %dl,%dl
  jne    L433
  jmp    L482
  xchg   %ax,%ax
L286:
  cmp    %cl,%dl
  je     L186
L433:
  movzbl 0x1(%rbp),%edx
  add    $0x1,%rbp
  test   %dl,%dl
  jne    L286
  xor    %eax,%eax
  jmp    L320
  nopl   0x0(%rax,%rax,1)
L375:
  mov    %rcx,%rax
L100:
  xor    %edx,%edx
  jmp    L179
  nopw   0x0(%rax,%rax,1)
L78:
  mov    $0x1,%eax
  jmp    L458
L446:
  cmp    %dil,%dl
  setge  %dl
  movzbl %dl,%edx
  jmp    L179
L372:
  mov    %rcx,%rax
  jmp    L278
```

assistant: ```c
int ms_globmatch(char *string, char *pattern) {
  int negate;
  int match;
  int c;
  while (*pattern) {
    if (!*string && *pattern != '*')
      return 0;
    switch (c = *pattern++) {
    case '*':
      while (*pattern == '*')
        pattern++;
      if (!*pattern)
        return 1;
      if (*pattern != '?' && *pattern != '[' && *pattern != '\\')
        while (*string && *pattern != *string)
          string++;
      while (*string) {
        if (ms_globmatch(string, pattern))
          return 1;
        string++;
      }
      return 0;
    case '?':
      if (*string)
        break;
      return 0;
    case '[':
      if (*pattern != '^')
        negate = 0;
      else {
        negate = 1;
        pattern++;
      }
      match = 0;
      while (!match && (c = *pattern++)) {
        if (!*pattern)
          return 0;
        if (*pattern == '-') {
          if (!*++pattern)
            return 0;
          if (*pattern != ']') {
            if (*string == c || *string == *pattern || (*string > c && *string < *pattern))
              match = 1;
          } else {
            if (*string >= c)
              match = 1;
            break;
          }
        } else {
          if (c == *string)
            match = 1;
          if (*pattern != ']') {
            if (*pattern == *string)
              match = 1;
          } else
            break;
        }
      }
      if (negate == match)
        return 0;
      while (*pattern && *pattern != ']')
        pattern++;
      if (!*pattern++)
        return 0;
      break;
    case '\\':
      if (*pattern)
        c = *pattern++;
    default:
      if (c != *string)
        return 0;
      break;
    }
    string++;
  }
  return !*string;
}
```