user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<DoMatch>:
  endbr64
  movzbl (%rsi),%eax
  test   %al,%al
  je     L175
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rsi,%rcx
  mov    %edx,%ebp
  movslq %edx,%r8
  test   %r8,%r8
  jle    L198
  mov    %rsi,%rbx
  mov    $0x1,%r11d
  mov    $0x0,%r13d
L185:
  movzbl (%rdi),%esi
  cmp    $0x2a,%al
  je     L59
  test   %sil,%sil
  je     L74
L59:
  cmp    $0x5b,%al
  je     L116
  jg     L232
  cmp    $0x2a,%al
  je     L319
  cmp    $0x3f,%al
  jne    L48
L127:
  add    $0x1,%rdi
  lea    0x1(%rbx),%rdx
  movzbl 0x1(%rbx),%eax
  test   %al,%al
  je     L198
  mov    %rdx,%rsi
  sub    %rcx,%rsi
  cmp    %r8,%rsi
  jge    L198
  mov    %rdx,%rbx
  jmp    L185
L232:
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
L48:
  cmp    (%rbx),%sil
  je     L127
  mov    $0x0,%eax
L224:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L319:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    $0x2a,%al
  jne    L84
  mov    %rbx,%rax
  sub    %rcx,%rax
  cmp    %r8,%rax
  jl     L319
L159:
  mov    %rbx,%r12
  sub    %rcx,%r12
L143:
  cmpb   $0x0,(%rdi)
  je     L242
  lea    0x1(%rdi),%r13
  mov    %ebp,%edx
  sub    %r12d,%edx
  mov    %rbx,%rsi
  call   <DoMatch>
  test   %eax,%eax
  jne    L224
  mov    %r13,%rdi
  jmp    L143
L84:
  test   %al,%al
  jne    L159
  mov    $0x1,%eax
  jmp    L224
L242:
  mov    $0xffffffff,%eax
  jmp    L224
L116:
  movzbl 0x1(%rbx),%eax
  cmp    $0x5e,%al
  sete   %r14b
  movzbl %r14b,%r14d
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
  movzbl 0x1(%rbx),%eax
  cmp    $0x5d,%al
  je     L45
  mov    %rbx,%rdx
  mov    %r13d,%r12d
  cmp    $0x2d,%al
  je     L45
L47:
  movsbl (%rdx),%r10d
  lea    0x1(%rdx),%rbx
  movzbl 0x1(%rdx),%eax
  cmp    $0x5d,%al
  je     L18
  test   %al,%al
  je     L18
  mov    %rbx,%r9
  sub    %rcx,%r9
  cmp    %r9,%r8
  jle    L18
  movsbl %sil,%r15d
  jmp    L403
L45:
  lea    0x1(%rbx),%rdx
  cmp    %al,%sil
  sete   %r12b
  movzbl %r12b,%r12d
  jmp    L47
L371:
  movzbl 0x2(%rdx),%r9d
  cmp    $0x5d,%r9b
  je     L332
  lea    0x2(%rdx),%rbx
  mov    %r13d,%eax
  cmp    %r9b,%sil
  jg     L209
  cmp    %r10d,%r15d
  setge  %al
  movzbl %al,%eax
L209:
  test   %eax,%eax
  jne    L92
L138:
  mov    %rbx,%rdx
L105:
  movsbl (%rdx),%r10d
  lea    0x1(%rdx),%rbx
  movzbl 0x1(%rdx),%eax
  cmp    $0x5d,%al
  je     L18
  test   %al,%al
  je     L18
  mov    %rbx,%r9
  sub    %rcx,%r9
  cmp    %r8,%r9
  jge    L18
L403:
  cmp    $0x2d,%al
  je     L371
L332:
  cmp    %al,%sil
  jne    L138
  mov    %rbx,%rdx
  mov    %r11d,%r12d
  jmp    L105
L92:
  mov    %rbx,%rdx
  mov    %r11d,%r12d
  jmp    L105
L18:
  cmp    %r12d,%r14d
  jne    L127
  mov    $0x0,%eax
  jmp    L224
L198:
  cmpb   $0x0,(%rdi)
  sete   %al
  movzbl %al,%eax
  jmp    L224
L74:
  mov    $0xffffffff,%eax
  jmp    L224
L175:
  cmpb   $0x0,(%rdi)
  sete   %al
  movzbl %al,%eax
  ret
```

assistant: ```c
int DoMatch(char *text, char *p, int plen) {
  register int last;
  register int matched;
  register int reverse;
  register char *savep = p;
  register char *savet = text;
  for (; *p && (p - savep) < plen; text++, p++) {
    if (*text == '\0' && *p != '*')
      return -1;
    switch (*p) {
    case '\\':
      p++;
    default:
      if (*text != *p)
        return 0;
      continue;
    case '?':
      continue;
    case '*':
      while (*++p == '*' && (p - savep) < plen)
        continue;
      if (*p == '\0')
        return 1;
      while (*text)
        if ((matched = DoMatch(text++, p, (plen - (p - savep)))) != 0)
          return matched;
      return -1;
    case '[':
      reverse = p[1] == '^' ? 1 : 0;
      if (reverse)
        p++;
      matched = 0;
      if (p[1] == ']' || p[1] == '-')
        if (*++p == *text)
          matched = 1;
      for (last = *p; *++p && *p != ']' && (p - savep) < plen; last = *p)
        if (*p == '-' && p[1] != ']' ? *text <= *++p && *text >= last : *text == *p)
          matched = 1;
      if (matched == reverse)
        return 0;
      continue;
    }
  }
  return *text == '\0';
}
```