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

```asm
<Gmatch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbx
L254:
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movzbl (%rax),%eax
  movsbl %al,%eax
  and    $0x7f,%eax
  mov    %eax,%r13d
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
  cmpl   $0x5b,-0x28(%rbp)
  je     L64
  cmpl   $0x5b,-0x28(%rbp)
  jg     L247
  cmpl   $0x3f,-0x28(%rbp)
  je     L200
  cmpl   $0x3f,-0x28(%rbp)
  jg     L247
  cmpl   $0x0,-0x28(%rbp)
  je     L321
  cmpl   $0x2a,-0x28(%rbp)
  je     L125
  jmp    L247
L64:
  movl   $0x0,-0x30(%rbp)
  movl   $0x7fff,-0x2c(%rbp)
  jmp    L290
L17:
  cmpl   $0x5d,-0x24(%rbp)
  jne    L212
  cmpl   $0x0,-0x30(%rbp)
  jne    L255
  mov    $0x0,%eax
  jmp    L229
L212:
  cmpl   $0x2d,-0x24(%rbp)
  jne    L164
  cmp    %r13d,-0x2c(%rbp)
  jg     L290
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    %eax,%r13d
  jg     L290
  addl   $0x1,-0x30(%rbp)
  jmp    L290
L164:
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  cmp    %r13d,-0x2c(%rbp)
  jne    L290
  addl   $0x1,-0x30(%rbp)
L290:
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jne    L17
  jmp    L289
L255:
  nop
L289:
  cmpl   $0x0,-0x24(%rbp)
  jne    L118
  cmpl   $0x0,-0x30(%rbp)
  je     L71
  sub    $0x1,%rbx
  jmp    L118
L71:
  mov    $0x0,%eax
  jmp    L229
L125:
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L214
  mov    $0x1,%eax
  jmp    L229
L214:
  sub    $0x1,%r12
  jmp    L314
L70:
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <Gmatch>
  test   %eax,%eax
  je     L94
  mov    $0x1,%eax
  jmp    L229
L94:
  add    $0x1,%r12
L314:
  movzbl (%r12),%eax
  test   %al,%al
  jne    L70
  mov    $0x0,%eax
  jmp    L229
L321:
  test   %r13d,%r13d
  sete   %al
  movzbl %al,%eax
  jmp    L229
L247:
  mov    -0x28(%rbp),%eax
  and    $0x7f,%eax
  cmp    %eax,%r13d
  je     L80
  mov    $0x0,%eax
  jmp    L229
L200:
  test   %r13d,%r13d
  jne    L310
  mov    $0x0,%eax
  jmp    L229
L118:
  nop
  jmp    L254
L80:
  nop
  jmp    L254
L310:
  nop
  jmp    L254
L229:
  add    $0x18,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
int Gmatch(register char *s, register char *p) {
  register int scc;
  int ok, lc;
  int c, cc;
  for (;;) {
    scc = *s++ & 0177;
    switch (c = *p++) {
    case '[':
      ok = 0;
      lc = 077777;
      while ((cc = *p++) != '\0') {
        if (cc == ']') {
          if (ok)
            break;
          return (0);
        }
        if (cc == '-') {
          if (lc <= scc && scc <= *p++)
            ok++;
        } else if (scc == (lc = cc))
          ok++;
      }
      if (cc == 0) {
        if (ok)
          p--;
        else
          return 0;
      }
      continue;
    case '*':
      if (!*p)
        return (1);
      for (s--; *s; s++)
        if (Gmatch(s, p))
          return (1);
      return (0);
    case 0:
      return (scc == 0);
    default:
      if ((c & 0177) != scc)
        return (0);
      continue;
    case '?':
      if (scc == 0)
        return (0);
      continue;
    }
  }
}
```