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

```asm
<DoMatch>:
  endbr64
  movzbl (%rsi),%eax
  test   %al,%al
  je     L208
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  movzbl (%rdi),%ecx
  cmp    $0x2a,%al
  je     L205
L235:
  test   %cl,%cl
  je     L61
L205:
  cmp    $0x5b,%al
  je     L41
L123:
  jg     L254
  cmp    $0x2a,%al
  je     L49
  cmp    $0x3f,%al
  jne    L124
L62:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rdi
  lea    0x1(%rbx),%rdx
  test   %al,%al
  je     L153
  movzbl (%rdi),%ecx
  mov    %rdx,%rbx
  cmp    $0x2a,%al
  jne    L235
  cmp    $0x5b,%al
  jne    L123
L41:
  movzbl 0x1(%rbx),%r8d
  xor    %r10d,%r10d
  cmp    $0x5e,%r8b
  sete   %r10b
  jne    L283
  movzbl 0x2(%rbx),%r8d
  add    $0x1,%rbx
L283:
  cmp    $0x5d,%r8b
  je     L48
  cmp    $0x2d,%r8b
  je     L48
  movsbl (%rbx),%esi
  mov    %r8d,%eax
  mov    %rbx,%rdx
  xor    %r9d,%r9d
L119:
  lea    0x1(%rdx),%rbx
  test   %al,%al
  je     L139
  cmp    $0x5d,%al
  je     L139
  movsbl %cl,%r11d
  jmp    L138
L117:
  cmp    %al,%cl
  jne    L80
L37:
  mov    %rbx,%rdx
  movsbl %al,%esi
  mov    $0x1,%r9d
  add    $0x1,%rbx
  movzbl 0x1(%rdx),%eax
  test   %al,%al
  je     L139
L300:
  cmp    $0x5d,%al
  je     L139
L138:
  cmp    $0x2d,%al
  jne    L117
  movzbl 0x2(%rdx),%r8d
  cmp    $0x5d,%r8b
  je     L117
  lea    0x2(%rdx),%rbx
  mov    %r8d,%eax
  cmp    %r8b,%cl
  jg     L80
  cmp    %esi,%r11d
  jge    L37
L80:
  mov    %rbx,%rdx
  movsbl %al,%esi
  add    $0x1,%rbx
  movzbl 0x1(%rdx),%eax
  test   %al,%al
  jne    L300
L139:
  cmp    %r9d,%r10d
  jne    L62
L282:
  xor    %eax,%eax
L190:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L254:
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
L124:
  cmp    (%rbx),%cl
  jne    L282
  jmp    L62
  nopl   0x0(%rax)
L49:
  movzbl 0x1(%rbx),%edx
  add    $0x1,%rbx
  cmp    $0x2a,%dl
  je     L49
  mov    $0x1,%eax
  test   %dl,%dl
  je     L190
  cmpb   $0x0,(%rdi)
  je     L61
L184:
  mov    %rbx,%rsi
  lea    0x1(%rdi),%rbp
  call   <DoMatch>
  test   %eax,%eax
  jne    L190
  mov    %rbp,%rdi
  cmpb   $0x0,(%rdi)
  jne    L184
L61:
  add    $0x8,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  ret
  nop
L48:
  xor    %r9d,%r9d
  cmp    %r8b,%cl
  movzbl 0x2(%rbx),%eax
  lea    0x1(%rbx),%rdx
  sete   %r9b
  movsbl %r8b,%esi
  jmp    L119
L153:
  xor    %eax,%eax
  cmpb   $0x0,(%rdi)
  sete   %al
  jmp    L190
L208:
  xor    %eax,%eax
  cmpb   $0x0,(%rdi)
  sete   %al
  ret
```

assistant: ```c
int DoMatch(register const char *text, register 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++;
      matched = 0;
      if (p[1] == ']' || p[1] == '-')
        if (*++p == *text)
          matched = 1;
      for (last = *p; *++p && *p != ']'; last = *p)
        if (*p == '-' && p[1] != ']' ? *text <= *++p && *text >= last : *text == *p)
          matched = 1;
      if (matched == reverse)
        return 0;
      continue;
    }
  }
  return *text == '\0';
}
```