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

```asm
<DoMatch>:
  endbr64
  movzbl (%rsi),%eax
  test   %al,%al
  je     L46
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    $0x0,%r9d
  mov    $0x100,%r11d
  mov    $0x1,%r8d
L80:
  movzbl (%rdi),%ecx
  cmp    $0x2a,%al
  je     L243
  test   %cl,%cl
  je     L66
L243:
  cmp    $0x5b,%al
  je     L358
  jg     L259
  cmp    $0x2a,%al
  je     L129
  cmp    $0x3f,%al
  jne    L15
L150:
  add    $0x1,%rdi
  lea    0x1(%rbx),%rdx
  movzbl 0x1(%rbx),%eax
  test   %al,%al
  je     L301
  mov    %rdx,%rbx
  jmp    L80
L259:
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
L15:
  cmp    (%rbx),%cl
  je     L150
  mov    $0x0,%eax
L114:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L129:
  add    $0x1,%rbx
  movzbl (%rbx),%edx
  cmp    $0x2a,%dl
  je     L129
  mov    $0x1,%eax
  test   %dl,%dl
  je     L114
L245:
  cmpb   $0x0,(%rdi)
  je     L279
  lea    0x1(%rdi),%rbp
  mov    %rbx,%rsi
  call   <DoMatch>
  test   %eax,%eax
  jne    L114
  mov    %rbp,%rdi
  jmp    L245
L279:
  mov    $0xffffffff,%eax
  jmp    L114
L358:
  movzbl 0x1(%rbx),%eax
  cmp    $0x5e,%al
  sete   %r12b
  movzbl %r12b,%r12d
  je     L4
  lea    0x1(%rbx),%rsi
  cmp    $0x5d,%al
  je     L272
  test   %al,%al
  je     L272
L12:
  mov    %rbx,%rdx
  mov    %rsi,%rbx
  mov    %r9d,%r10d
  mov    %r11d,%esi
  movsbl %cl,%ebp
  jmp    L339
L4:
  lea    0x1(%rbx),%rdx
  lea    0x2(%rbx),%rsi
  movzbl 0x2(%rbx),%eax
  cmp    $0x5d,%al
  je     L18
  test   %al,%al
  je     L18
  mov    %rdx,%rbx
  jmp    L12
L67:
  lea    0x2(%rdx),%rbx
  mov    %r9d,%eax
  cmp    0x2(%rdx),%cl
  jg     L16
  cmp    %esi,%ebp
  setge  %al
  movzbl %al,%eax
L16:
  test   %eax,%eax
  jne    L96
L323:
  mov    %rbx,%rdx
L299:
  movsbl (%rdx),%esi
  lea    0x1(%rdx),%rbx
  movzbl 0x1(%rdx),%eax
  cmp    $0x5d,%al
  je     L227
  test   %al,%al
  je     L227
L339:
  cmp    $0x2d,%al
  je     L67
  cmp    %al,%cl
  jne    L323
  mov    %rbx,%rdx
  mov    %r8d,%r10d
  jmp    L299
L96:
  mov    %rbx,%rdx
  mov    %r8d,%r10d
  jmp    L299
L227:
  cmp    %r12d,%r10d
  jne    L150
  mov    $0x0,%eax
  jmp    L114
L18:
  mov    %rsi,%rbx
  jmp    L150
L301:
  cmpb   $0x0,(%rdi)
  sete   %al
  movzbl %al,%eax
  jmp    L114
L66:
  mov    $0xffffffff,%eax
  jmp    L114
L272:
  mov    $0x0,%eax
  jmp    L114
L46:
  cmpb   $0x0,(%rdi)
  sete   %al
  movzbl %al,%eax
  ret
```

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