user: Translate the below assembly code into C programming language:

```asm
<amatch>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  movzbl (%rsi),%eax
  test   %al,%al
  je     L93
  mov    $0x0,%edi
  mov    $0x1,%r8d
  mov    $0x5c,%r9d
  jmp    L351
L181:
  cmp    $0x5c,%al
  jne    L309
  movzbl 0x1(%rsi),%eax
  test   %al,%al
  je     L32
  add    $0x2,%rsi
  movsbl %al,%eax
  jmp    L510
L309:
  movsbl %al,%eax
  mov    %rbx,%rsi
L510:
  movsbl %dl,%edx
  cmp    %eax,%edx
  jne    L251
L447:
  add    $0x1,%rbp
  movzbl (%rsi),%eax
  test   %al,%al
  je     L93
L351:
  movzbl 0x0(%rbp),%edx
  cmp    $0x2a,%al
  je     L175
  test   %dl,%dl
  je     L94
L175:
  lea    0x1(%rsi),%rbx
  cmp    $0x5b,%al
  je     L179
  jg     L181
  cmp    $0x2a,%al
  je     L57
  cmp    $0x3f,%al
  jne    L309
  test   %dl,%dl
  je     L47
  mov    %rbx,%rsi
  jmp    L447
L57:
  movzbl 0x1(%rsi),%ecx
  cmp    $0x2a,%cl
  jne    L400
L596:
  add    $0x1,%rbx
  movzbl (%rbx),%ecx
  cmp    $0x2a,%cl
  je     L596
L400:
  mov    $0x1,%eax
  test   %cl,%cl
  je     L544
  lea    -0x5b(%rcx),%eax
  cmp    $0x1,%al
  jbe    L223
  cmp    $0x3f,%cl
  jne    L428
L223:
  mov    $0x0,%eax
  cmpb   $0x0,0x0(%rbp)
  jne    L502
  jmp    L544
L428:
  cmp    %cl,%dl
  je     L223
  test   %dl,%dl
  je     L223
L46:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%eax
  cmp    %cl,%al
  je     L223
  test   %al,%al
  jne    L46
  jmp    L223
L182:
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  je     L544
L502:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <amatch>
  test   %eax,%eax
  je     L182
  mov    $0x1,%eax
  jmp    L544
L47:
  mov    $0x0,%eax
  jmp    L544
L179:
  mov    %edi,%r11d
  cmpb   $0x5e,0x1(%rsi)
  jne    L441
  lea    0x2(%rsi),%rbx
  mov    %r8d,%r11d
  jmp    L441
L374:
  lea    0x2(%rbx),%rsi
  movzbl 0x2(%rbx),%eax
  test   %al,%al
  je     L158
  cmp    $0x5d,%al
  je     L108
  cmp    %al,%dl
  je     L405
  cmp    %cl,%dl
  je     L405
  cmp    %al,%dl
  jge    L203
  cmp    %cl,%dl
  jg     L221
L203:
  mov    %rsi,%rbx
L441:
  lea    0x1(%rbx),%rsi
  movzbl (%rbx),%ecx
  test   %cl,%cl
  je     L591
  movzbl 0x1(%rbx),%eax
  test   %al,%al
  je     L490
  cmp    $0x2d,%al
  je     L374
  cmp    %cl,%dl
  sete   %r10b
  movzbl %r10b,%r10d
  cmp    $0x5d,%al
  je     L129
  cmp    %al,%dl
  je     L146
  cmp    %cl,%dl
  jne    L203
  mov    %r8d,%r10d
  jmp    L129
L108:
  cmp    %cl,%dl
  setge  %r10b
  movzbl %r10b,%r10d
  jmp    L129
L591:
  mov    %edi,%r10d
L129:
  cmp    %r10d,%r11d
  je     L154
  movzbl (%rsi),%eax
  test   %al,%al
  je     L412
  cmp    $0x5d,%al
  je     L412
L506:
  add    $0x1,%rsi
  movzbl (%rsi),%eax
  test   %al,%al
  je     L412
  cmp    $0x5d,%al
  jne    L506
L412:
  add    $0x1,%rsi
  test   %al,%al
  jne    L447
  mov    $0x0,%eax
  jmp    L544
L405:
  mov    %r8d,%r10d
  jmp    L129
L221:
  mov    %r8d,%r10d
  jmp    L129
L146:
  mov    %r8d,%r10d
  jmp    L129
L32:
  mov    %rbx,%rsi
  mov    %r9d,%eax
  jmp    L510
L93:
  cmpb   $0x0,0x0(%rbp)
  sete   %al
  movzbl %al,%eax
  jmp    L544
L94:
  mov    $0x0,%eax
  jmp    L544
L490:
  mov    $0x0,%eax
L544:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L158:
  mov    $0x0,%eax
  jmp    L544
L154:
  mov    $0x0,%eax
  jmp    L544
L251:
  mov    $0x0,%eax
  jmp    L544
```

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