user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<fnmatch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L244:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x1a(%rbp)
  movsbl -0x1a(%rbp),%eax
  cmp    $0x5c,%eax
  je     L471
  cmp    $0x5c,%eax
  jg     L253
  cmp    $0x5b,%eax
  je     L473
  cmp    $0x5b,%eax
  jg     L253
  cmp    $0x3f,%eax
  je     L489
  cmp    $0x3f,%eax
  jg     L253
  test   %eax,%eax
  je     L278
  cmp    $0x2a,%eax
  je     L172
  jmp    L253
L278:
  mov    -0x34(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L562
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L562
  mov    $0x0,%eax
  jmp    L476
L562:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  setne  %al
  movzbl %al,%eax
  jmp    L476
L489:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L316
  mov    $0x1,%eax
  jmp    L476
L316:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L241
  mov    -0x34(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L241
  mov    $0x1,%eax
  jmp    L476
L241:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L412
  mov    -0x34(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L412
  mov    -0x30(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  je     L667
  mov    -0x34(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L412
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L412
L667:
  mov    $0x1,%eax
  jmp    L476
L412:
  addq   $0x1,-0x30(%rbp)
  jmp    L206
L172:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x1a(%rbp)
  jmp    L78
L403:
  addq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x1a(%rbp)
L78:
  cmpb   $0x2a,-0x1a(%rbp)
  je     L403
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L653
  mov    -0x34(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L653
  mov    -0x30(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  je     L608
  mov    -0x34(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L653
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L653
L608:
  mov    $0x1,%eax
  jmp    L476
L653:
  cmpb   $0x0,-0x1a(%rbp)
  jne    L475
  mov    -0x34(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L215
  mov    -0x34(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  jne    L199
  mov    -0x30(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L199
  mov    $0x1,%eax
  jmp    L476
L199:
  mov    $0x0,%eax
  jmp    L476
L215:
  mov    $0x0,%eax
  jmp    L476
L475:
  cmpb   $0x2f,-0x1a(%rbp)
  jne    L644
  mov    -0x34(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L644
  mov    -0x30(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  jne    L315
  mov    $0x1,%eax
  jmp    L476
L67:
  mov    -0x34(%rbp),%eax
  and    $0xfffffffb,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fnmatch>
  test   %eax,%eax
  jne    L432
  mov    $0x0,%eax
  jmp    L476
L432:
  cmpb   $0x2f,-0x19(%rbp)
  jne    L330
  mov    -0x34(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  jne    L127
L330:
  addq   $0x1,-0x30(%rbp)
L644:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x19(%rbp)
  cmpb   $0x0,-0x19(%rbp)
  jne    L67
  jmp    L357
L127:
  nop
L357:
  mov    $0x1,%eax
  jmp    L476
L473:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L33
  mov    $0x1,%eax
  jmp    L476
L33:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L603
  mov    -0x34(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L603
  mov    $0x1,%eax
  jmp    L476
L603:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    -0x34(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <rangematch@plt>
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L395
  mov    $0x1,%eax
  jmp    L476
L395:
  addq   $0x1,-0x30(%rbp)
  jmp    L206
L471:
  mov    -0x34(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L253
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x1a(%rbp)
  cmpb   $0x0,-0x1a(%rbp)
  jne    L253
  movb   $0x5c,-0x1a(%rbp)
  subq   $0x1,-0x28(%rbp)
L253:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x1a(%rbp)
  je     L396
  mov    -0x34(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L537
  movzbl -0x1a(%rbp),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  je     L396
L537:
  mov    $0x1,%eax
  jmp    L476
L396:
  addq   $0x1,-0x30(%rbp)
  jmp    L206
L315:
  nop
L206:
  jmp    L244
L476:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int fnmatch(const char *pattern, const char *string, int flags) {
  const char *stringstart;
  char c;
  char test;
  for (stringstart = string;;)
    switch (c = *pattern++) {
    case '\0':
      if ((flags & 0x08) && *string == '/')
        return (0);
      return (*string == '\0' ? 0 : 1);
    case '?':
      if (*string == '\0')
        return (1);
      if (*string == '/' && (flags & 0x02))
        return (1);
      if (*string == '.' && (flags & 0x04) && (string == stringstart || ((flags & 0x02) && *(string - 1) == '/')))
        return (1);
      ++string;
      break;
    case '*':
      c = *pattern;
      while (c == '*')
        c = *++pattern;
      if (*string == '.' && (flags & 0x04) && (string == stringstart || ((flags & 0x02) && *(string - 1) == '/')))
        return (1);
      if (c == '\0')
        if (flags & 0x02)
          return ((flags & 0x08) || strchr(string, '/') == NULL ? 0 : 1);
        else
          return (0);
      else if (c == '/' && flags & 0x02) {
        if ((string = strchr(string, '/')) == NULL)
          return (1);
        break;
      }
      while ((test = *string) != '\0') {
        if (!fnmatch(pattern, string, flags & ~0x04))
          return (0);
        if (test == '/' && flags & 0x02)
          break;
        ++string;
      }
      return (1);
    case '[':
      if (*string == '\0')
        return (1);
      if (*string == '/' && flags & 0x02)
        return (1);
      if ((pattern = rangematch(pattern, *string, flags)) == NULL)
        return (1);
      ++string;
      break;
    case '\\':
      if (!(flags & 0x01)) {
        if ((c = *pattern++) == '\0') {
          c = '\\';
          --pattern;
        }
      }
    default:
      if (c == *string)
        ;
      else if ((flags & 0x10) && (tolower((unsigned char)c) == tolower((unsigned char)*string)))
        ;
      else
        return (1);
      string++;
      break;
    }
}
```