user: Converte this assembly snippet into its equivalent C code:

```asm
<match>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L36
L293:
  movsbl -0x21(%rbp),%eax
  cmp    $0x3f,%eax
  je     L402
  cmp    $0x5c,%eax
  jne    L459
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  je     L60
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L459
L60:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
L459:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x21(%rbp)
  je     L402
  mov    $0x1,%eax
  jmp    L164
L402:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L36
  mov    $0x1,%eax
  jmp    L164
L36:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
  cmpb   $0x0,-0x21(%rbp)
  je     L100
  cmpb   $0x2a,-0x21(%rbp)
  jne    L293
L100:
  cmpb   $0x0,-0x21(%rbp)
  jne    L73
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  jmp    L164
L73:
  nop
L10:
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L63
L56:
  movsbl -0x21(%rbp),%eax
  cmp    $0x5c,%eax
  je     L190
  cmp    $0x5c,%eax
  jg     L327
  cmp    $0x2a,%eax
  je     L154
  cmp    $0x3f,%eax
  jne    L327
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L154
  mov    $0x1,%eax
  jmp    L164
L154:
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L63
L190:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  je     L45
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L327
L45:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
  jmp    L327
L63:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
  cmpb   $0x0,-0x21(%rbp)
  jne    L56
  jmp    L364
L327:
  nop
L364:
  cmpb   $0x0,-0x21(%rbp)
  jne    L96
  mov    $0x0,%eax
  jmp    L164
L384:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L96
  mov    $0x1,%eax
  jmp    L164
L96:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  cmp    %al,-0x21(%rbp)
  jne    L384
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L440
L76:
  movsbl -0x21(%rbp),%eax
  cmp    $0x5c,%eax
  je     L84
  cmp    $0x5c,%eax
  jg     L310
  cmp    $0x2a,%eax
  je     L10
  cmp    $0x3f,%eax
  je     L457
  jmp    L310
L84:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  je     L338
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L310
L338:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
L310:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x21(%rbp)
  je     L457
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L10
L457:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L440
  mov    $0x1,%eax
  jmp    L164
L440:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x21(%rbp)
  cmpb   $0x0,-0x21(%rbp)
  jne    L76
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L149
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L10
L149:
  mov    $0x0,%eax
L164:
  pop    %rbp
  ret
```

assistant: ```c
int match(const char *mask, const char *string) {
  const char *m = mask, *s = string;
  char ch;
  const char *bm, *bs;
  while ((ch = *m++) && (ch != '*'))
    switch (ch) {
    case '\\':
      if (*m == '?' || *m == '*')
        ch = *m++;
    default:
      if (*s != ch)
        return 1;
    case '?':
      if (!*s++)
        return 1;
    };
  if (!ch)
    return *s;
got_star:
  bm = m;
  while ((ch = *m++))
    switch (ch) {
    case '?':
      if (!*s++)
        return 1;
    case '*':
      bm = m;
      continue;
    case '\\':
      if (*m == '?' || *m == '*')
        ch = *m++;
    default:
      goto break_while;
    };
break_while:
  if (!ch)
    return 0;
  while (*s++ != ch)
    if (!*s)
      return 1;
  bs = s;
  while ((ch = *m++)) {
    switch (ch) {
    case '*':
      goto got_star;
    case '\\':
      if (*m == '?' || *m == '*')
        ch = *m++;
    default:
      if (*s != ch) {
        m = bm;
        s = bs;
        goto got_star;
      };
    case '?':
      if (!*s++)
        return 1;
    };
  };
  if (*s) {
    m = bm;
    s = bs;
    goto got_star;
  };
  return 0;
}
```