user: Converte this assembly snippet into its equivalent C code:

```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     L427
L108:
  jg     L312
  cmp    $0x88,%dl
  je     L302
  test   %dl,%dl
  jne    L362
  xor    %eax,%eax
  cmpb   $0x0,0x0(%rbp)
  sete   %al
L61:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L362:
  cmp    $0x81,%dl
  jne    L136
  movzbl 0x0(%rbp),%eax
  test   %r12d,%r12d
  je     L471
  cmp    $0x81,%al
  je     L311
L471:
  add    $0x1,%rbp
  lea    0x2(%rdi),%rbx
  cmp    %al,0x1(%rdi)
  jne    L37
L302:
  mov    %rbx,%rdi
L418:
  movzbl (%rdi),%edx
  lea    0x1(%rdi),%rbx
  cmp    $0x2a,%dl
  jne    L108
L427:
  movzbl 0x1(%rdi),%eax
  cmp    $0x2a,%al
  je     L359
  cmp    $0x88,%al
  jne    L640
  cs nopw 0x0(%rax,%rax,1)
L359:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  cmp    $0x88,%al
  je     L359
  cmp    $0x2a,%al
  je     L359
L640:
  cmp    $0x81,%al
  setne  %cl
  cmp    $0x3f,%al
  setne  %dl
  test   %dl,%cl
  je     L121
  cmp    $0x5b,%al
  jne    L269
  cs nopw 0x0(%rax,%rax,1)
L121:
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <pmatch>
  test   %eax,%eax
  jne    L416
  movzbl 0x0(%rbp),%edx
  test   %r12d,%r12d
  je     L314
  cmp    $0x81,%dl
  jne    L314
  movzbl 0x1(%rbp),%edx
  add    $0x1,%rbp
  nopl   0x0(%rax)
L314:
  add    $0x1,%rbp
  test   %dl,%dl
  jne    L121
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L312:
  cmp    $0x3f,%dl
  je     L164
  cmp    $0x5b,%dl
  jne    L136
  movzbl 0x1(%rdi),%r9d
  mov    %rbx,%r10
  mov    %r9d,%esi
  cmp    $0x21,%r9b
  je     L156
L15:
  mov    %esi,%eax
  mov    %r10,%rcx
  nopl   0x0(%rax)
L449:
  cmp    $0x88,%al
  je     L187
  test   %al,%al
  je     L136
  cmp    $0x81,%al
  sete   %al
  movzbl %al,%eax
  add    %rcx,%rax
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%eax
  cmp    $0x5d,%al
  jne    L449
  xor    %r11d,%r11d
  cmp    $0x21,%r9b
  movzbl 0x0(%rbp),%r9d
  sete   %r11b
  test   %r12d,%r12d
  je     L373
  cmp    $0x81,%r9b
  jne    L373
  movzbl 0x1(%rbp),%r9d
  add    $0x2,%rbp
L466:
  test   %r9b,%r9b
  je     L37
  movzbl 0x1(%r10),%edx
  lea    0x1(%r10),%rax
  xor    %edi,%edi
  jmp    L168
  nopl   0x0(%rax)
L477:
  cmp    %r9b,%sil
  cmove  %r8d,%edi
L628:
  lea    0x1(%rax),%rbx
  cmp    $0x5d,%dl
  je     L315
L617:
  mov    %edx,%esi
  movzbl 0x1(%rax),%edx
  mov    %rbx,%rax
L168:
  cmp    $0x88,%sil
  je     L628
  cmp    $0x81,%sil
  jne    L656
  mov    %edx,%esi
  add    $0x1,%rax
  movzbl (%rax),%edx
L656:
  cmp    $0x2d,%dl
  jne    L477
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%eax
  cmp    $0x5d,%al
  jne    L374
  cmp    %r9b,%sil
  je     L377
  mov    $0x2d,%esi
  mov    $0x5d,%edx
  mov    %rcx,%rax
  jmp    L477
  nop
L136:
  movzbl 0x0(%rbp),%eax
  test   %r12d,%r12d
  je     L557
  cmp    $0x81,%al
  je     L338
L557:
  add    $0x1,%rbp
  cmp    %al,%dl
  je     L302
  nopl   (%rax)
L37:
  xor    %eax,%eax
  jmp    L61
  nopw   0x0(%rax,%rax,1)
L187:
  movzbl 0x1(%rcx),%eax
  add    $0x1,%rcx
  jmp    L449
  nopl   (%rax)
L164:
  movzbl 0x0(%rbp),%eax
  test   %r12d,%r12d
  je     L343
  cmp    $0x81,%al
  je     L79
L343:
  add    $0x1,%rbp
  test   %al,%al
  je     L37
  mov    %rbx,%rdi
  jmp    L418
  nopl   0x0(%rax)
L483:
  movzbl 0x1(%rcx),%eax
  add    $0x1,%rcx
L374:
  cmp    $0x88,%al
  je     L483
  cmp    $0x81,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rcx
  cmp    %r9b,%sil
  jg     L597
  cmp    %r9b,(%rcx)
  cmovge %r8d,%edi
L597:
  movzbl 0x1(%rcx),%edx
  lea    0x1(%rcx),%rax
  lea    0x1(%rax),%rbx
  cmp    $0x5d,%dl
  jne    L617
L315:
  cmp    %r11d,%edi
  je     L37
  mov    %rbx,%rdi
  jmp    L418
  nopl   0x0(%rax)
L156:
  movzbl 0x2(%rdi),%esi
  lea    0x2(%rdi),%r10
  jmp    L15
  nopl   (%rax)
L338:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  add    $0x1,%rbp
  cmp    %al,%dl
  je     L302
  jmp    L37
  nopl   0x0(%rax)
L311:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  jmp    L471
  nopl   (%rax)
L79:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  jmp    L343
  nopl   (%rax)
L269:
  movzbl 0x0(%rbp),%edx
  cmp    %al,%dl
  jne    L649
  jmp    L121
  nopl   (%rax)
L494:
  test   %dl,%dl
  je     L37
  mov    %rbp,%rdx
L289:
  lea    0x1(%rdx),%rbp
  movzbl 0x1(%rdx),%edx
  cmp    %al,%dl
  je     L121
L649:
  test   %r12d,%r12d
  je     L494
  cmp    $0x81,%dl
  jne    L494
  cmp    %al,0x1(%rbp)
  je     L121
  lea    0x1(%rbp),%rdx
  jmp    L289
  nopl   0x0(%rax)
L373:
  add    $0x1,%rbp
  jmp    L466
  nopl   0x0(%rax)
L377:
  mov    $0x1,%edi
  mov    $0x2d,%esi
  mov    $0x5d,%edx
  mov    %rcx,%rax
  jmp    L477
  nopw   0x0(%rax,%rax,1)
L416:
  mov    $0x1,%eax
  jmp    L61
```

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;
}
```