user: 请将以下的汇编代码转换成C语言代码：

```asm
<amatch>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  movsbl (%rsi),%eax
  test   %al,%al
  je     L474
L503:
  movsbl 0x0(%rbp),%edx
  test   %dl,%dl
  jne    L36
  cmp    $0x2a,%al
  jne    L279
  lea    0x1(%rsi),%rbx
L249:
  movzbl (%rbx),%ecx
  cmp    $0x2a,%cl
  jne    L317
  nopl   0x0(%rax)
L68:
  movzbl 0x1(%rbx),%ecx
  add    $0x1,%rbx
  cmp    $0x2a,%cl
  je     L68
L317:
  mov    $0x1,%eax
  test   %cl,%cl
  je     L431
  lea    -0x5b(%rcx),%eax
  cmp    $0x1,%al
  jbe    L105
  cmp    $0x3f,%cl
  jne    L335
L105:
  test   %dl,%dl
  je     L279
  cs nopw 0x0(%rax,%rax,1)
L49:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <amatch>
  test   %eax,%eax
  jne    L292
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  jne    L49
L431:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L36:
  lea    0x1(%rsi),%rbx
  cmp    $0x3f,%al
  je     L226
  jle    L83
  cmp    $0x5b,%al
  je     L153
  cmp    $0x5c,%al
  jne    L158
  movsbl 0x1(%rsi),%eax
  add    $0x2,%rsi
  test   %al,%al
  je     L435
L351:
  cmp    %eax,%edx
  jne    L279
L496:
  movsbl (%rsi),%eax
  add    $0x1,%rbp
  test   %al,%al
  jne    L503
L474:
  xor    %eax,%eax
  cmpb   $0x0,0x0(%rbp)
  sete   %al
  jmp    L431
L83:
  cmp    $0x2a,%al
  je     L249
L158:
  mov    %rbx,%rsi
  jmp    L351
  nopl   (%rax)
L153:
  movzbl 0x1(%rsi),%edi
  lea    0x2(%rsi),%rax
  cmp    $0x5e,%dil
  je     L565
  test   %dil,%dil
  je     L279
  xor    %r8d,%r8d
  jmp    L109
L442:
  cmp    %dil,%dl
  je     L467
  cmp    $0x5d,%cl
  je     L558
  cmp    %cl,%dl
  je     L467
  movzbl (%rax),%edi
  lea    0x1(%rax),%rcx
  test   %dil,%dil
  je     L423
L242:
  mov    %rax,%rbx
  mov    %rcx,%rax
L109:
  movzbl 0x1(%rbx),%ecx
  test   %cl,%cl
  je     L279
L157:
  cmp    $0x2d,%cl
  jne    L442
  movzbl 0x2(%rbx),%esi
  lea    0x2(%rbx),%rax
  test   %sil,%sil
  je     L279
  cmp    $0x5d,%sil
  je     L218
  cmp    %dil,%dl
  je     L467
  cmp    %sil,%dl
  je     L467
  cmp    %dil,%dl
  jle    L212
  cmp    %sil,%dl
  jl     L467
L212:
  lea    0x3(%rbx),%rcx
  mov    %esi,%edi
  jmp    L242
  nopl   0x0(%rax)
L226:
  mov    %rbx,%rsi
  jmp    L496
L435:
  mov    %rbx,%rsi
  mov    $0x5c,%eax
  jmp    L351
  nopl   (%rax)
L565:
  movzbl 0x2(%rsi),%edi
  lea    0x3(%rsi),%rcx
  test   %dil,%dil
  je     L353
  mov    %rax,%rbx
  mov    %rcx,%rax
  mov    $0x1,%r8d
  movzbl 0x1(%rbx),%ecx
  test   %cl,%cl
  jne    L157
  nopl   (%rax)
L279:
  xor    %eax,%eax
L462:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L467:
  mov    $0x1,%edx
L114:
  cmp    %r8d,%edx
  jne    L73
  jmp    L279
  nopl   0x0(%rax)
L260:
  add    $0x1,%rax
L73:
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L498
  cmp    $0x5d,%dl
  jne    L260
L498:
  lea    0x1(%rax),%rsi
  test   %dl,%dl
  jne    L496
  xor    %eax,%eax
  jmp    L462
  nopl   0x0(%rax,%rax,1)
L335:
  cmp    %cl,%dl
  je     L105
  test   %dl,%dl
  jne    L34
  jmp    L279
  xchg   %ax,%ax
L18:
  cmp    %cl,%dl
  je     L105
L34:
  movzbl 0x1(%rbp),%edx
  add    $0x1,%rbp
  test   %dl,%dl
  jne    L18
  xor    %eax,%eax
  jmp    L462
  nopl   0x0(%rax,%rax,1)
L423:
  mov    %rcx,%rax
L558:
  xor    %edx,%edx
  jmp    L114
  nopw   0x0(%rax,%rax,1)
L292:
  mov    $0x1,%eax
  jmp    L431
L218:
  cmp    %dil,%dl
  setge  %dl
  movzbl %dl,%edx
  jmp    L114
L353:
  mov    %rcx,%rax
  jmp    L73
```

assistant: ```c
int amatch(char *str, char *p) {
  int negate;
  int match;
  int c;
  while (*p) {
    if (!*str && *p != '*')
      return 0;
    switch (c = *p++) {
    case '*':
      while (*p == '*')
        p++;
      if (!*p)
        return 1;
      if (*p != '?' && *p != '[' && *p != '\\')
        while (*str && *p != *str)
          str++;
      while (*str) {
        if (amatch(str, p))
          return 1;
        str++;
      }
      return 0;
    case '?':
      if (*str)
        break;
      return 0;
    case '[':
      if (*p != '^')
        negate = 0;
      else {
        negate = 1;
        p++;
      }
      match = 0;
      while (!match && (c = *p++)) {
        if (!*p)
          return 0;
        if (*p == '-') {
          if (!*++p)
            return 0;
          if (*p != ']') {
            if (*str == c || *str == *p || (*str > c && *str < *p))
              match = 1;
          } else {
            if (*str >= c)
              match = 1;
            break;
          }
        } else {
          if (c == *str)
            match = 1;
          if (*p != ']') {
            if (*p == *str)
              match = 1;
          } else
            break;
        }
      }
      if (negate == match)
        return 0;
      while (*p && *p != ']')
        p++;
      if (!*p++)
        return 0;
      break;
    case '\\':
      if (*p)
        c = *p++;
    default:
      if (c != *str)
        return 0;
      break;
    }
    str++;
  }
  return !*str;
}
```