user: Please show me the C implementation that matches the assembly code listed below:

```asm
<DoMatch>:
  endbr64
  movzbl (%rsi),%eax
  test   %al,%al
  je     L139
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    $0x1,%r9d
  mov    $0x0,%r11d
L43:
  movzbl (%rdi),%ecx
  cmp    $0x2a,%al
  je     L131
  test   %cl,%cl
  je     L109
L131:
  cmp    $0x5b,%al
  je     L175
  jg     L270
  cmp    $0x2a,%al
  je     L183
  cmp    $0x3f,%al
  jne    L75
L47:
  add    $0x1,%rdi
  lea    0x1(%rbx),%rdx
  movzbl 0x1(%rbx),%eax
  test   %al,%al
  je     L35
  mov    %rdx,%rbx
  jmp    L43
L270:
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
L75:
  cmp    (%rbx),%cl
  je     L47
  mov    $0x0,%eax
L232:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L183:
  add    $0x1,%rbx
  movzbl (%rbx),%edx
  cmp    $0x2a,%dl
  je     L183
  mov    $0x1,%eax
  test   %dl,%dl
  je     L232
L345:
  cmpb   $0x0,(%rdi)
  je     L68
  lea    0x1(%rdi),%rbp
  mov    %rbx,%rsi
  call   <DoMatch>
  test   %eax,%eax
  jne    L232
  mov    %rbp,%rdi
  jmp    L345
L68:
  mov    $0xffffffff,%eax
  jmp    L232
L175:
  movzbl 0x1(%rbx),%eax
  cmp    $0x5e,%al
  sete   %bpl
  movzbl %bpl,%ebp
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
  movzbl 0x1(%rbx),%eax
  cmp    $0x5d,%al
  je     L286
  mov    %rbx,%rdx
  mov    %r11d,%r10d
  cmp    $0x2d,%al
  je     L286
L143:
  movsbl (%rdx),%esi
  lea    0x1(%rdx),%rbx
  movzbl 0x1(%rdx),%eax
  cmp    $0x5d,%al
  je     L261
  test   %al,%al
  je     L261
  movsbl %cl,%r12d
  jmp    L318
L286:
  lea    0x1(%rbx),%rdx
  cmp    %al,%cl
  sete   %r10b
  movzbl %r10b,%r10d
  jmp    L143
L245:
  movzbl 0x2(%rdx),%r8d
  cmp    $0x5d,%r8b
  je     L142
  lea    0x2(%rdx),%rbx
  mov    %r11d,%eax
  cmp    %r8b,%cl
  jg     L267
  cmp    %esi,%r12d
  setge  %al
  movzbl %al,%eax
L267:
  test   %eax,%eax
  jne    L36
L8:
  mov    %rbx,%rdx
L213:
  movsbl (%rdx),%esi
  lea    0x1(%rdx),%rbx
  movzbl 0x1(%rdx),%eax
  cmp    $0x5d,%al
  je     L261
  test   %al,%al
  je     L261
L318:
  cmp    $0x2d,%al
  je     L245
L142:
  cmp    %al,%cl
  jne    L8
  mov    %rbx,%rdx
  mov    %r9d,%r10d
  jmp    L213
L36:
  mov    %rbx,%rdx
  mov    %r9d,%r10d
  jmp    L213
L261:
  cmp    %r10d,%ebp
  jne    L47
  mov    $0x0,%eax
  jmp    L232
L35:
  cmpb   $0x0,(%rdi)
  sete   %al
  movzbl %al,%eax
  jmp    L232
L109:
  mov    $0xffffffff,%eax
  jmp    L232
L139:
  cmpb   $0x0,(%rdi)
  sete   %al
  movzbl %al,%eax
  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';
}
```