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

```asm
<fnmatch_helper>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x2,%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x8,%eax
  mov    %eax,-0x3c(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  cmpl   $0x0,-0x48(%rbp)
  je     L89
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L89
  cmpl   $0x0,-0x40(%rbp)
  je     L231
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L231
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  jmp    L429
L231:
  mov    -0x28(%rbp),%rax
L429:
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L89
  mov    -0x58(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x60(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    $0x1,%eax
  jmp    L18
L89:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x5b,%eax
  je     L319
  cmp    $0x5b,%eax
  jg     L292
  cmp    $0x2a,%eax
  je     L55
  cmp    $0x3f,%eax
  je     L179
  jmp    L292
L48:
  nop
L55:
  addq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  je     L48
  cmpl   $0x0,-0x40(%rbp)
  je     L450
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L450
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  jmp    L399
L450:
  mov    -0x28(%rbp),%rax
L399:
  movzbl (%rax),%eax
  test   %al,%al
  je     L479
  cmpl   $0x0,-0x44(%rbp)
  je     L3
  cmpl   $0x0,-0x40(%rbp)
  je     L546
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L546
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  jmp    L106
L546:
  mov    -0x28(%rbp),%rax
L106:
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L3
L479:
  cmpl   $0x0,-0x40(%rbp)
  je     L588
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L588
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  jmp    L724
L588:
  mov    -0x28(%rbp),%rax
L724:
  mov    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x60(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    $0x0,%eax
  jmp    L18
L3:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L197
  cmpl   $0x0,-0x44(%rbp)
  je     L35
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L35
L197:
  mov    -0x58(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x60(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    $0x1,%eax
  jmp    L18
L35:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L638
L179:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L57
  cmpl   $0x0,-0x44(%rbp)
  je     L551
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L551
L57:
  mov    -0x58(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x60(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    $0x1,%eax
  jmp    L18
L551:
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x20(%rbp)
  jmp    L638
L319:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L353
  cmpl   $0x0,-0x44(%rbp)
  je     L373
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L373
L353:
  mov    -0x58(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x60(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    $0x1,%eax
  jmp    L18
L373:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x64(%rbp),%edx
  mov    -0x20(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <bracket@plt>
  cltq
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L148
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  addq   $0x1,-0x20(%rbp)
  jmp    L638
L292:
  cmpl   $0x0,-0x40(%rbp)
  je     L564
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L564
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  jmp    L714
L564:
  mov    -0x28(%rbp),%rax
L714:
  mov    %rax,-0x28(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L112
  cmpl   $0x0,-0x44(%rbp)
  je     L19
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L19
L112:
  mov    -0x58(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x60(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L520
  cmpl   $0x0,-0x44(%rbp)
  je     L466
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L520
L466:
  mov    $0x1,%eax
  jmp    L18
L520:
  mov    $0x0,%eax
  jmp    L18
L19:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L415
  cmpl   $0x0,-0x44(%rbp)
  je     L119
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L415
L119:
  cmpl   $0x0,-0x3c(%rbp)
  je     L395
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xffffff80,%eax
  test   %eax,%eax
  jne    L395
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L395
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  movzbl %al,%ebx
  jmp    L62
L395:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%ebx
L62:
  cmpl   $0x0,-0x3c(%rbp)
  je     L123
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xffffff80,%eax
  test   %eax,%eax
  jne    L123
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isupper@plt>
  test   %eax,%eax
  je     L123
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  movzbl %al,%eax
  jmp    L289
L123:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
L289:
  cmp    %eax,%ebx
  jne    L187
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x20(%rbp)
  jmp    L638
L148:
  nop
  jmp    L134
L415:
  nop
  jmp    L134
L187:
  nop
L134:
  cmpq   $0x0,-0x38(%rbp)
  je     L312
  cmpq   $0x0,-0x30(%rbp)
  je     L312
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  addq   $0x1,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L638
L312:
  mov    -0x58(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x60(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    $0x1,%eax
  jmp    L18
L638:
  jmp    L89
L18:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int fnmatch_helper(pcur, scur, flags) const char **pcur;
const char **scur;
int flags;
{
  const int period = !(flags & 0x04);
  const int pathname = flags & 0x02;
  const int escape = !(flags & 0x01);
  const int nocase = flags & 0x08;
  const char *ptmp = 0;
  const char *stmp = 0;
  const char *p = *pcur;
  const char *s = *scur;
  if (period && *s == '.' && *(escape && *(p) == '\\' ? (p) + 1 : (p)) != '.')
    return *pcur = p, *scur = s, (1);
  ;
  while (1) {
    switch (*p) {
    case '*':
      do {
        p++;
      } while (*p == '*');
      if ((!*((escape && *(p) == '\\' ? (p) + 1 : (p))) || (pathname && *((escape && *(p) == '\\' ? (p) + 1 : (p))) == '/'))) {
        p = (escape && *(p) == '\\' ? (p) + 1 : (p));
        return *pcur = p, *scur = s, (0);
        ;
      }
      if ((!*(s) || (pathname && *(s) == '/')))
        return *pcur = p, *scur = s, (1);
      ;
      ptmp = p;
      stmp = s;
      continue;
    case '?':
      if ((!*(s) || (pathname && *(s) == '/')))
        return *pcur = p, *scur = s, (1);
      ;
      p++;
      (++(s));
      continue;
    case '[': {
      const char *t;
      if ((!*(s) || (pathname && *(s) == '/')))
        return *pcur = p, *scur = s, (1);
      ;
      if ((t = bracket(p + 1, s, flags)) != 0) {
        p = t;
        (++(s));
        continue;
      }
      goto failed;
    }
    }
    p = (escape && *(p) == '\\' ? (p) + 1 : (p));
    if ((!*(s) || (pathname && *(s) == '/')))
      return *pcur = p, *scur = s, ((!*(p) || (pathname && *(p) == '/')) ? 0 : 1);
    ;
    if ((!*(p) || (pathname && *(p) == '/')))
      goto failed;
    if (((((unsigned char)((nocase && (isascii((int)(unsigned char)(*(p))) && isupper((int)(unsigned char)(*(p)))) ? tolower(*(p)) : (*(p))))) - ((unsigned char)((nocase && (isascii((int)(unsigned char)(*(s))) && isupper((int)(unsigned char)(*(s)))) ? tolower(*(s)) : (*(s))))))) != 0)
      goto failed;
    (++(p));
    (++(s));
    continue;
  failed:
    if (ptmp && stmp) {
      p = ptmp;
      (++(stmp));
      s = stmp;
      continue;
    }
    return *pcur = p, *scur = s, (1);
    ;
  }
}
```