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

```asm
<match>:
  endbr64
  jmp    L282
  cs nopw 0x0(%rax,%rax,1)
L272:
  movzbl 0x1(%rdi),%eax
  cmp    $0x3f,%al
  je     L75
  cmp    $0x2a,%al
  je     L75
  cmp    $0x5c,%dl
  jne    L46
  add    $0x1,%rsi
  nopl   (%rax)
L24:
  mov    %rcx,%rdi
L282:
  movzbl (%rdi),%eax
  lea    0x1(%rdi),%rcx
  test   %al,%al
  je     L184
  cmp    $0x2a,%al
  je     L183
  movzbl (%rsi),%edx
  cmp    $0x3f,%al
  je     L17
  cmp    $0x5c,%al
  je     L272
L40:
  cmp    %dl,%al
  jne    L46
L17:
  add    $0x1,%rsi
  test   %dl,%dl
  jne    L24
L46:
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L357:
  movzbl (%rsi),%eax
  test   %al,%al
  je     L46
L199:
  add    $0x1,%rsi
  cmp    %al,%dl
  jne    L357
  movzbl (%rdi),%eax
  mov    %rsi,%rdx
  lea    0x1(%rdi),%rcx
  test   %al,%al
  je     L192
L264:
  cmp    $0x3f,%al
  je     L112
  cmp    $0x5c,%al
  je     L332
  cmp    $0x2a,%al
  je     L300
L113:
  cmp    %al,(%rdx)
  jne    L231
L53:
  add    $0x1,%rdx
  test   %al,%al
  je     L46
L59:
  mov    %rcx,%rdi
  movzbl (%rdi),%eax
  lea    0x1(%rdi),%rcx
  test   %al,%al
  jne    L264
L192:
  cmpb   $0x0,(%rdx)
  je     L47
L231:
  mov    %rsi,%rdx
  mov    %r8,%rcx
  xchg   %ax,%ax
L300:
  mov    %rdx,%rsi
L183:
  movzbl (%rcx),%edx
  lea    0x1(%rcx),%rdi
  test   %dl,%dl
  je     L47
L0:
  lea    -0x1(%rdi),%r8
  cmp    $0x3f,%dl
  je     L63
  cmp    $0x5c,%dl
  je     L11
  cmp    $0x2a,%dl
  je     L118
L144:
  movzbl (%rsi),%eax
  jmp    L199
  cs nopw 0x0(%rax,%rax,1)
L75:
  lea    0x2(%rdi),%rcx
  jmp    L40
  nopl   0x0(%rax)
L63:
  cmpb   $0x0,(%rsi)
  je     L46
  add    $0x1,%rsi
L118:
  movzbl (%rdi),%edx
  add    $0x1,%rdi
  test   %dl,%dl
  jne    L0
L47:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L11:
  movzbl (%rdi),%eax
  cmp    $0x3f,%al
  je     L363
  cmp    $0x2a,%al
  jne    L144
L363:
  lea    0x2(%r8),%rdi
  test   %al,%al
  je     L47
  mov    %eax,%edx
  jmp    L144
  nopw   0x0(%rax,%rax,1)
L332:
  movzbl 0x1(%rdi),%eax
  cmp    $0x3f,%al
  je     L265
  cmp    $0x2a,%al
  je     L265
  cmpb   $0x5c,(%rdx)
  jne    L231
  add    $0x1,%rdx
  jmp    L59
  xchg   %ax,%ax
L112:
  movzbl (%rdx),%eax
  jmp    L53
  nopl   0x0(%rax,%rax,1)
L184:
  movsbl (%rsi),%eax
  ret
L265:
  lea    0x2(%rdi),%rcx
  jmp    L113
```

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