user: 请将以下的汇编代码转换成C语言代码：

```asm
<match>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  jmp    L211
  nopw   0x0(%rax,%rax,1)
L32:
  movsbl %al,%ebp
  mov    %rdx,%r12
L74:
  movsbl (%rbx),%edi
  call   <tolower@plt>
  mov    %ebp,%edi
  mov    %eax,%r13d
  call   <tolower@plt>
  cmp    %al,%r13b
  jne    L160
L222:
  add    $0x1,%rbx
  cmpb   $0x0,-0x1(%rbx)
  je     L160
L211:
  movzbl (%r12),%eax
  lea    0x1(%r12),%rdx
  test   %al,%al
  je     L111
  cmp    $0x2a,%al
  je     L37
  cmp    $0x3f,%al
  je     L235
  cmp    $0x5c,%al
  jne    L32
  movzbl 0x1(%r12),%eax
  cmp    $0x3f,%al
  je     L14
  cmp    $0x2a,%al
  je     L14
  mov    %rdx,%r12
  mov    $0x5c,%ebp
  jmp    L74
L224:
  cmpb   $0x0,(%r14)
  je     L112
L83:
  mov    %rbx,%r14
  mov    %r12,%rdx
  nopl   0x0(%rax)
L304:
  mov    %r14,%rbx
L37:
  movsbl (%rdx),%edi
  lea    0x1(%rdx),%rbp
  test   %dil,%dil
  je     L112
L67:
  lea    -0x1(%rbp),%r12
  cmp    $0x3f,%dil
  je     L10
  cmp    $0x5c,%dil
  je     L207
  cmp    $0x2a,%dil
  je     L402
L306:
  call   <tolower@plt>
  movsbl (%rbx),%edi
  mov    %eax,%r13d
  test   %dil,%dil
  jne    L388
  nopl   (%rax)
L160:
  mov    $0x1,%eax
L48:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L251:
  movsbl (%rbx),%edi
  test   %dil,%dil
  je     L160
L388:
  add    $0x1,%rbx
  call   <tolower@plt>
  cmp    %r13b,%al
  jne    L251
  mov    %rbx,%r14
L22:
  movzbl 0x0(%rbp),%eax
  lea    0x1(%rbp),%rdx
  test   %al,%al
  je     L224
  cmp    $0x3f,%al
  je     L178
  cmp    $0x5c,%al
  je     L180
  cmp    $0x2a,%al
  je     L304
  movsbl %al,%r13d
  mov    %rdx,%rbp
L20:
  movsbl (%r14),%edi
  call   <tolower@plt>
  mov    %r13d,%edi
  mov    %eax,%r15d
  call   <tolower@plt>
  cmp    %al,%r15b
  jne    L219
L311:
  add    $0x1,%r14
  cmpb   $0x0,-0x1(%r14)
  jne    L22
  jmp    L160
  nopl   (%rax)
L235:
  mov    %rdx,%r12
  jmp    L222
  nopl   0x0(%rax,%rax,1)
L14:
  add    $0x2,%r12
  movsbl %al,%ebp
  jmp    L74
  nopl   0x0(%rax)
L10:
  cmpb   $0x0,(%rbx)
  je     L160
  add    $0x1,%rbx
L402:
  movsbl 0x0(%rbp),%edi
  add    $0x1,%rbp
  test   %dil,%dil
  jne    L67
L112:
  xor    %eax,%eax
  jmp    L48
  nopl   (%rax)
L207:
  movzbl 0x0(%rbp),%eax
  cmp    $0x3f,%al
  je     L390
  mov    $0x5c,%edi
  cmp    $0x2a,%al
  jne    L306
L390:
  lea    0x2(%r12),%rbp
  test   %al,%al
  je     L112
  movsbl %al,%edi
  jmp    L306
  xchg   %ax,%ax
L111:
  movsbl (%rbx),%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L178:
  mov    %rdx,%rbp
  jmp    L311
L180:
  movzbl 0x1(%rbp),%eax
  cmp    $0x3f,%al
  je     L134
  cmp    $0x2a,%al
  je     L134
  mov    %rdx,%rbp
  mov    $0x5c,%r13d
  jmp    L20
L134:
  add    $0x2,%rbp
  movsbl %al,%r13d
  jmp    L20
L219:
  cmpb   $0x0,(%rbx)
  jne    L83
  jmp    L160
```

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 (tolower(*s) != tolower(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;
  ch = tolower(ch);
  if (!*s)
    return 1;
  while (tolower(*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 (tolower(*s) != tolower(ch)) {
        if (!*bs)
          return 1;
        m = bm;
        s = bs;
        goto got_star;
      };
    case '?':
      if (!*s++)
        return 1;
    };
  };
  if (*s) {
    m = bm;
    s = bs;
    goto got_star;
  };
  return 0;
}
```