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

```asm
<pmatch>:
  endbr64
  push   %r12
  mov    %edx,%r12d
  mov    $0x1,%r8d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  movzbl (%rdi),%edx
  lea    0x1(%rdi),%rbx
  cmp    $0x2a,%dl
  je     L141
L57:
  jg     L284
  cmp    $0x88,%dl
  je     L648
  test   %dl,%dl
  jne    L389
  xor    %eax,%eax
  cmpb   $0x0,0x0(%rbp)
  sete   %al
L709:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L389:
  cmp    $0x81,%dl
  jne    L728
  movzbl 0x0(%rbp),%eax
  test   %r12d,%r12d
  je     L323
  cmp    $0x81,%al
  je     L355
L323:
  add    $0x1,%rbp
  lea    0x2(%rdi),%rbx
  cmp    %al,0x1(%rdi)
  jne    L269
L648:
  mov    %rbx,%rdi
L586:
  movzbl (%rdi),%edx
  lea    0x1(%rdi),%rbx
  cmp    $0x2a,%dl
  jne    L57
L141:
  movzbl 0x1(%rdi),%eax
  cmp    $0x2a,%al
  je     L97
  cmp    $0x88,%al
  jne    L51
  cs nopw 0x0(%rax,%rax,1)
L97:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  cmp    $0x88,%al
  je     L97
  cmp    $0x2a,%al
  je     L97
L51:
  cmp    $0x81,%al
  setne  %cl
  cmp    $0x3f,%al
  setne  %dl
  test   %dl,%cl
  je     L196
  cmp    $0x5b,%al
  jne    L524
L196:
  test   %r12d,%r12d
  jne    L182
  nop
L127:
  xor    %edx,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <pmatch>
  test   %eax,%eax
  jne    L107
  movzbl 0x0(%rbp),%edx
  add    $0x1,%rbp
  test   %dl,%dl
  jne    L127
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L284:
  cmp    $0x3f,%dl
  je     L673
  cmp    $0x5b,%dl
  jne    L728
  movzbl 0x1(%rdi),%r9d
  mov    %rbx,%r10
  mov    %r9d,%esi
  cmp    $0x21,%r9b
  je     L199
L703:
  mov    %esi,%eax
  mov    %r10,%rcx
  nopl   0x0(%rax)
L366:
  cmp    $0x88,%al
  je     L148
  test   %al,%al
  je     L728
  cmp    $0x81,%al
  sete   %al
  movzbl %al,%eax
  add    %rcx,%rax
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%eax
  cmp    $0x5d,%al
  jne    L366
  xor    %r11d,%r11d
  cmp    $0x21,%r9b
  movzbl 0x0(%rbp),%r9d
  sete   %r11b
  test   %r12d,%r12d
  je     L445
  cmp    $0x81,%r9b
  jne    L445
  movzbl 0x1(%rbp),%r9d
  add    $0x2,%rbp
L82:
  test   %r9b,%r9b
  je     L269
  movzbl 0x1(%r10),%edx
  lea    0x1(%r10),%rax
  xor    %edi,%edi
  jmp    L627
  nopl   0x0(%rax)
L695:
  cmp    %r9b,%sil
  cmove  %r8d,%edi
L554:
  lea    0x1(%rax),%rbx
  cmp    $0x5d,%dl
  je     L41
L64:
  mov    %edx,%esi
  movzbl 0x1(%rax),%edx
  mov    %rbx,%rax
L627:
  cmp    $0x88,%sil
  je     L554
  cmp    $0x81,%sil
  jne    L81
  mov    %edx,%esi
  add    $0x1,%rax
  movzbl (%rax),%edx
L81:
  cmp    $0x2d,%dl
  jne    L695
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%eax
  cmp    $0x5d,%al
  jne    L56
  cmp    %r9b,%sil
  je     L563
  mov    $0x2d,%esi
  mov    $0x5d,%edx
  mov    %rcx,%rax
  jmp    L695
  nop
L728:
  movzbl 0x0(%rbp),%eax
  test   %r12d,%r12d
  je     L24
  cmp    $0x81,%al
  je     L130
L24:
  add    $0x1,%rbp
  cmp    %al,%dl
  je     L648
L269:
  xor    %eax,%eax
  jmp    L709
  nopl   0x0(%rax)
L148:
  movzbl 0x1(%rcx),%eax
  add    $0x1,%rcx
  jmp    L366
  nopl   (%rax)
L673:
  movzbl 0x0(%rbp),%eax
  test   %r12d,%r12d
  je     L515
  cmp    $0x81,%al
  je     L652
L515:
  add    $0x1,%rbp
  test   %al,%al
  je     L269
  mov    %rbx,%rdi
  jmp    L586
  nopl   0x0(%rax)
L635:
  add    $0x1,%rbp
  test   %dl,%dl
  je     L709
L182:
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <pmatch>
  test   %eax,%eax
  jne    L107
  movzbl 0x0(%rbp),%edx
  cmp    $0x81,%dl
  jne    L635
  movzbl 0x1(%rbp),%edx
  add    $0x2,%rbp
  test   %dl,%dl
  jne    L182
  jmp    L709
  nopl   0x0(%rax)
L123:
  movzbl 0x1(%rcx),%eax
  add    $0x1,%rcx
L56:
  cmp    $0x88,%al
  je     L123
  cmp    $0x81,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rcx
  cmp    %r9b,%sil
  jg     L442
  cmp    %r9b,(%rcx)
  cmovge %r8d,%edi
L442:
  movzbl 0x1(%rcx),%edx
  lea    0x1(%rcx),%rax
  lea    0x1(%rax),%rbx
  cmp    $0x5d,%dl
  jne    L64
  nopl   0x0(%rax,%rax,1)
L41:
  cmp    %r11d,%edi
  je     L269
  mov    %rbx,%rdi
  jmp    L586
  nopl   0x0(%rax)
L199:
  movzbl 0x2(%rdi),%esi
  lea    0x2(%rdi),%r10
  jmp    L703
  nopl   (%rax)
L130:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  add    $0x1,%rbp
  cmp    %al,%dl
  je     L648
  jmp    L269
  nopl   0x0(%rax)
L355:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  jmp    L323
  nopl   (%rax)
L652:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  jmp    L515
  nopl   (%rax)
L524:
  movzbl 0x0(%rbp),%edx
  cmp    %al,%dl
  je     L196
  test   %r12d,%r12d
  jne    L480
  jmp    L44
  nopl   0x0(%rax,%rax,1)
L202:
  movzbl 0x1(%rbp),%edx
  add    $0x1,%rbp
  cmp    %dl,%al
  je     L127
L44:
  test   %dl,%dl
  jne    L202
  xor    %eax,%eax
  jmp    L709
  nopl   0x0(%rax,%rax,1)
L331:
  test   %dl,%dl
  je     L269
  mov    %rbp,%rdx
L178:
  lea    0x1(%rdx),%rbp
  movzbl 0x1(%rdx),%edx
  cmp    %al,%dl
  je     L182
L480:
  cmp    $0x81,%dl
  jne    L331
  cmp    %al,0x1(%rbp)
  je     L182
  lea    0x1(%rbp),%rdx
  jmp    L178
  nop
L445:
  add    $0x1,%rbp
  jmp    L82
  nopl   0x0(%rax)
L563:
  mov    $0x1,%edi
  mov    $0x2d,%esi
  mov    $0x5d,%edx
  mov    %rcx,%rax
  jmp    L695
  nopw   0x0(%rax,%rax,1)
L107:
  mov    $0x1,%eax
  jmp    L709
```

assistant: ```c
int pmatch(char *pattern, char *string, int squoted) {
  char *p, *q;
  char c;
  p = pattern;
  q = string;
  for (;;) {
    switch (c = *p++) {
    case '\0':
      goto breakloop;
    case '\201':
      if (squoted && *q == '\201')
        q++;
      if (*q++ != *p++)
        return 0;
      break;
    case '\210':
      continue;
    case '?':
      if (squoted && *q == '\201')
        q++;
      if (*q++ == '\0')
        return 0;
      break;
    case '*':
      c = *p;
      while (c == '\210' || c == '*')
        c = *++p;
      if (c != '\201' && c != '\210' && c != '?' && c != '*' && c != '[') {
        while (*q != c) {
          if (squoted && *q == '\201' && q[1] == c)
            break;
          if (*q == '\0')
            return 0;
          if (squoted && *q == '\201')
            q++;
          q++;
        }
      }
      do {
        if (pmatch(p, q, squoted))
          return 1;
        if (squoted && *q == '\201')
          q++;
      } while (*q++ != '\0');
      return 0;
    case '[': {
      char *endp;
      int invert, found;
      char chr;
      endp = p;
      if (*endp == '!')
        endp++;
      for (;;) {
        while (*endp == '\210')
          endp++;
        if (*endp == '\0')
          goto dft;
        if (*endp == '\201')
          endp++;
        if (*++endp == ']')
          break;
      }
      invert = 0;
      if (*p == '!') {
        invert++;
        p++;
      }
      found = 0;
      chr = *q++;
      if (squoted && chr == '\201')
        chr = *q++;
      if (chr == '\0')
        return 0;
      c = *p++;
      do {
        if (c == '\210')
          continue;
        if (c == '\201')
          c = *p++;
        if (*p == '-' && p[1] != ']') {
          p++;
          while (*p == '\210')
            p++;
          if (*p == '\201')
            p++;
          if (chr >= c && chr <= *p)
            found = 1;
          p++;
        } else {
          if (chr == c)
            found = 1;
        }
      } while ((c = *p++) != ']');
      if (found == invert)
        return 0;
      break;
    }
    dft:
    default:
      if (squoted && *q == '\201')
        q++;
      if (*q++ != c)
        return 0;
      break;
    }
  }
breakloop:
  if (*q != '\0')
    return 0;
  return 1;
}
```