user: 下面的汇编指令对应的C源代码是什么:

```asm
<fnmatch>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  and    $0x2,%r12d
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  mov    %edx,%eax
  and    $0x1,%eax
  mov    %eax,0xc(%rsp)
  mov    %edx,%eax
  and    $0x4,%eax
  mov    %eax,0x8(%rsp)
  mov    %edx,%eax
  and    $0x10,%eax
  mov    %eax,0x4(%rsp)
  lea    0x20(%rsp),%rax
  mov    %rax,0x10(%rsp)
L291:
  movzbl (%r15),%ebp
  movzbl 0x0(%r13),%r9d
  lea    0x1(%r15),%rdi
  cmp    $0x3f,%bpl
  je     L499
  jg     L120
  test   %bpl,%bpl
  je     L212
  cmp    $0x2a,%bpl
  jne    L669
  movzbl 0x1(%r15),%eax
  mov    %rdi,%r15
  cmp    $0x2a,%al
  jne    L11
L563:
  movzbl 0x1(%r15),%eax
  add    $0x1,%r15
  cmp    $0x2a,%al
  je     L563
L11:
  cmp    $0x2e,%r9b
  je     L466
L262:
  test   %al,%al
  je     L562
  cmp    $0x2f,%al
  jne    L61
  test   %r12d,%r12d
  je     L642
  mov    %r13,%rdi
  mov    $0x2f,%esi
  call   <strchr@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L291
  nopl   (%rax)
L221:
  mov    $0x1,%eax
  jmp    L490
  nopw   0x0(%rax,%rax,1)
L120:
  cmp    $0x5b,%bpl
  je     L561
  cmp    $0x5c,%bpl
  jne    L669
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  je     L478
L669:
  mov    %rdi,%r15
L268:
  cmp    %bpl,0x0(%r13)
  je     L290
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  je     L221
  movzbl %bpl,%edi
  call   <tolower@plt>
  movzbl 0x0(%r13),%edi
  mov    %eax,%ebp
  call   <tolower@plt>
  cmp    %eax,%ebp
  jne    L221
L290:
  add    $0x1,%r13
  jmp    L291
  nopw   0x0(%rax,%rax,1)
L499:
  test   %r9b,%r9b
  je     L221
  cmp    $0x2f,%r9b
  je     L390
  cmp    $0x2e,%r9b
  jne    L133
  mov    0x8(%rsp),%r8d
  test   %r8d,%r8d
  je     L133
  cmp    %rbx,%r13
  je     L221
  test   %r12d,%r12d
  je     L133
  cmpb   $0x2f,-0x1(%r13)
  jne    L133
  jmp    L221
  nopl   0x0(%rax)
L212:
  and    $0x8,%r14d
  jne    L152
L245:
  xor    %eax,%eax
  test   %r9b,%r9b
  setne  %al
L490:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L603
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L561:
  test   %r9b,%r9b
  je     L221
  cmp    $0x2f,%r9b
  je     L3
  cmp    $0x2e,%r9b
  jne    L461
  mov    0x8(%rsp),%ecx
  test   %ecx,%ecx
  je     L461
  cmp    %rbx,%r13
  je     L221
  test   %r12d,%r12d
  je     L461
  cmpb   $0x2f,-0x1(%r13)
  jne    L461
  jmp    L221
  nopl   0x0(%rax,%rax,1)
L152:
  cmp    $0x2f,%r9b
  jne    L245
L129:
  xor    %eax,%eax
  jmp    L490
  nopw   0x0(%rax,%rax,1)
L478:
  movzbl 0x1(%r15),%eax
  test   %al,%al
  je     L669
  add    $0x2,%r15
  mov    %eax,%ebp
  jmp    L268
  nopl   0x0(%rax,%rax,1)
L466:
  mov    0x8(%rsp),%esi
  test   %esi,%esi
  je     L262
  cmp    %rbx,%r13
  je     L221
  test   %r12d,%r12d
  je     L262
  cmpb   $0x2f,-0x1(%r13)
  jne    L262
  jmp    L221
  xchg   %ax,%ax
L3:
  test   %r12d,%r12d
  jne    L221
L461:
  mov    0x10(%rsp),%rcx
  movsbl %r9b,%esi
  mov    %r14d,%edx
  mov    %rdi,0x18(%rsp)
  call   <rangematch@plt>
  test   %eax,%eax
  je     L221
  cmp    $0x1,%eax
  je     L587
  cmp    $0xffffffff,%eax
  mov    0x18(%rsp),%rdi
  je     L669
L133:
  add    $0x1,%r13
  mov    %rdi,%r15
  jmp    L291
  cs nopw 0x0(%rax,%rax,1)
L390:
  test   %r12d,%r12d
  je     L133
  jmp    L221
  nopw   0x0(%rax,%rax,1)
L587:
  mov    0x20(%rsp),%rdi
  jmp    L133
L562:
  test   %r12d,%r12d
  je     L129
  and    $0x8,%r14d
  jne    L129
  mov    $0x2f,%esi
  mov    %r13,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L490
L61:
  test   %r9b,%r9b
  je     L221
  mov    %r14d,%ebx
  and    $0xfffffffb,%ebx
  test   %r12d,%r12d
  je     L684
  jmp    L305
  nopl   0x0(%rax,%rax,1)
L222:
  add    $0x1,%r13
  cmpb   $0x0,0x0(%r13)
  je     L221
L684:
  mov    %ebx,%edx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <fnmatch>
  test   %eax,%eax
  jne    L222
  xor    %eax,%eax
  jmp    L490
L549:
  movzbl 0x1(%r13),%r9d
  add    $0x1,%r13
  test   %r9b,%r9b
  je     L221
L305:
  mov    %ebx,%edx
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    %r9b,0x4(%rsp)
  call   <fnmatch>
  test   %eax,%eax
  je     L129
  movzbl 0x4(%rsp),%r9d
  cmp    $0x2f,%r9b
  jne    L549
  jmp    L221
L642:
  mov    %r14d,%ebx
  and    $0xfffffffb,%ebx
  test   %r9b,%r9b
  jne    L684
  jmp    L221
L603:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int fnmatch(const char *pattern, const char *string, int flags) {
  const char *stringstart;
  char *newp;
  char c, 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 (*string == '.' && (flags & 0x04) && (string == stringstart || ((flags & 0x02) && *(string - 1) == '/')))
        return (1);
      switch (rangematch(pattern, *string, flags, &newp)) {
      case (-1):
        goto norm;
      case 1:
        pattern = newp;
        break;
      case 0:
        return (1);
      }
      ++string;
      break;
    case '\\':
      if (!(flags & 0x01)) {
        if ((c = *pattern++) == '\0') {
          c = '\\';
          --pattern;
        }
      }
    default:
    norm:
      if (c == *string)
        ;
      else if ((flags & 0x10) && (tolower((unsigned char)c) == tolower((unsigned char)*string)))
        ;
      else
        return (1);
      string++;
      break;
    }
}
```