user: Translate the below assembly code into C programming language:

```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    L303
  nopw   0x0(%rax,%rax,1)
L108:
  movsbl %al,%ebp
  mov    %rdx,%r12
L359:
  movsbl (%rbx),%edi
  call   <tolower@plt>
  mov    %ebp,%edi
  mov    %eax,%r13d
  call   <tolower@plt>
  cmp    %al,%r13b
  jne    L61
L156:
  add    $0x1,%rbx
  cmpb   $0x0,-0x1(%rbx)
  je     L61
L303:
  movzbl (%r12),%eax
  lea    0x1(%r12),%rdx
  test   %al,%al
  je     L40
  cmp    $0x2a,%al
  je     L295
  cmp    $0x3f,%al
  je     L16
  cmp    $0x5c,%al
  jne    L108
  movzbl 0x1(%r12),%eax
  cmp    $0x3f,%al
  je     L194
  cmp    $0x2a,%al
  je     L194
  mov    %rdx,%r12
  mov    $0x5c,%ebp
  jmp    L359
L112:
  cmpb   $0x0,(%r14)
  je     L331
L100:
  mov    %rbx,%r14
  mov    %r12,%rdx
  nopl   0x0(%rax)
L299:
  mov    %r14,%rbx
L295:
  movsbl (%rdx),%edi
  lea    0x1(%rdx),%rbp
  test   %dil,%dil
  je     L331
L193:
  lea    -0x1(%rbp),%r12
  cmp    $0x3f,%dil
  je     L67
  cmp    $0x5c,%dil
  je     L135
  cmp    $0x2a,%dil
  je     L88
L319:
  call   <tolower@plt>
  cmpb   $0x0,(%rbx)
  mov    %eax,%r13d
  jne    L301
  nopw   0x0(%rax,%rax,1)
L61:
  mov    $0x1,%eax
L310:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L235:
  cmpb   $0x0,(%rbx)
  je     L61
L301:
  movsbl (%rbx),%edi
  add    $0x1,%rbx
  call   <tolower@plt>
  cmp    %r13b,%al
  jne    L235
  mov    %rbx,%r14
L58:
  movzbl 0x0(%rbp),%eax
  lea    0x1(%rbp),%rdx
  test   %al,%al
  je     L112
  cmp    $0x3f,%al
  je     L111
  cmp    $0x5c,%al
  je     L390
  cmp    $0x2a,%al
  je     L299
  movsbl %al,%r13d
  mov    %rdx,%rbp
L272:
  movsbl (%r14),%edi
  call   <tolower@plt>
  mov    %r13d,%edi
  mov    %eax,%r15d
  call   <tolower@plt>
  cmp    %al,%r15b
  jne    L227
L286:
  add    $0x1,%r14
  cmpb   $0x0,-0x1(%r14)
  jne    L58
  jmp    L61
  nopl   (%rax)
L16:
  mov    %rdx,%r12
  jmp    L156
  nopl   0x0(%rax,%rax,1)
L194:
  add    $0x2,%r12
  movsbl %al,%ebp
  jmp    L359
  nopl   0x0(%rax)
L67:
  cmpb   $0x0,(%rbx)
  je     L61
  add    $0x1,%rbx
L88:
  movsbl 0x0(%rbp),%edi
  add    $0x1,%rbp
  test   %dil,%dil
  jne    L193
L331:
  xor    %eax,%eax
  jmp    L310
  nopl   (%rax)
L135:
  movzbl 0x0(%rbp),%eax
  cmp    $0x3f,%al
  je     L239
  mov    $0x5c,%edi
  cmp    $0x2a,%al
  jne    L319
L239:
  lea    0x2(%r12),%rbp
  test   %al,%al
  je     L331
  movsbl %al,%edi
  jmp    L319
  xchg   %ax,%ax
L40:
  movsbl (%rbx),%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L111:
  mov    %rdx,%rbp
  jmp    L286
L390:
  movzbl 0x1(%rbp),%eax
  cmp    $0x3f,%al
  je     L257
  cmp    $0x2a,%al
  je     L257
  mov    %rdx,%rbp
  mov    $0x5c,%r13d
  jmp    L272
L257:
  add    $0x2,%rbp
  movsbl %al,%r13d
  jmp    L272
L227:
  cmpb   $0x0,(%rbx)
  jne    L100
  jmp    L61
```

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