user: What would the C source look like for the assembly code provided here:

```asm
<fnmatch>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r13
  mov    %rsi,0x8(%rsp)
  mov    %edx,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsi,%r12
  mov    %edx,%r15d
  and    $0x4,%r15d
  jmp    L77
L214:
  test   %bl,%bl
  je     L739
  cmp    $0x2a,%bl
  jne    L502
  movzbl 0x1(%r13),%eax
  cmp    $0x2a,%al
  jne    L395
L47:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%eax
  cmp    $0x2a,%al
  je     L47
  mov    %rbp,%r13
L495:
  movzbl (%r12),%ebx
  cmp    $0x2e,%bl
  je     L95
L60:
  test   %al,%al
  je     L329
  cmp    $0x2f,%al
  jne    L688
  test   $0x2,%r14b
  je     L688
  mov    $0x2f,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%r12
  test   %rax,%rax
  jne    L77
  mov    $0x1,%eax
  jmp    L226
L502:
  mov    %rbp,%r13
  jmp    L168
L699:
  mov    %rbp,%r13
  jmp    L168
L739:
  test   $0x8,%r14b
  je     L355
  mov    $0x0,%eax
  cmpb   $0x2f,(%r12)
  je     L226
L355:
  cmpb   $0x0,(%r12)
  setne  %al
  movzbl %al,%eax
L226:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L785
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L324:
  movzbl (%r12),%eax
  test   %al,%al
  je     L255
  cmp    $0x2f,%al
  je     L337
  cmp    $0x2e,%al
  jne    L763
  test   %r15d,%r15d
  je     L763
  cmp    0x8(%rsp),%r12
  je     L247
  test   $0x2,%r14b
  je     L763
  cmpb   $0x2f,-0x1(%r12)
  jne    L763
  mov    $0x1,%eax
  jmp    L226
L337:
  test   $0x2,%r14b
  jne    L486
L763:
  add    $0x1,%r12
  mov    %rbp,%r13
  jmp    L77
L395:
  mov    %rbp,%r13
  jmp    L495
L95:
  test   %r15d,%r15d
  je     L60
  cmp    0x8(%rsp),%r12
  je     L521
  test   $0x2,%r14b
  je     L60
  cmpb   $0x2f,-0x1(%r12)
  jne    L60
  mov    $0x1,%eax
  jmp    L226
L329:
  mov    %r14d,%eax
  and    $0x2,%eax
  je     L226
  mov    $0x0,%eax
  test   $0x8,%r14b
  jne    L226
  mov    $0x2f,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L226
L650:
  add    $0x1,%r12
  movzbl (%r12),%ebx
  test   %bl,%bl
  je     L213
L99:
  mov    %ebp,%edx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <fnmatch>
  test   %eax,%eax
  je     L226
  cmp    $0x2f,%bl
  jne    L650
  test   $0x2,%r14b
  je     L650
  mov    $0x1,%eax
  jmp    L226
L213:
  mov    $0x1,%eax
  jmp    L226
L688:
  mov    %r14d,%ebp
  and    $0xfffffffb,%ebp
  mov    $0x1,%eax
  test   %bl,%bl
  jne    L99
  jmp    L226
L300:
  movzbl (%r12),%esi
  test   %sil,%sil
  je     L264
  cmp    $0x2f,%sil
  je     L198
  cmp    $0x2e,%sil
  jne    L640
  test   %r15d,%r15d
  je     L640
  cmp    0x8(%rsp),%r12
  je     L539
  test   $0x2,%r14b
  je     L640
  cmpb   $0x2f,-0x1(%r12)
  jne    L640
  mov    $0x1,%eax
  jmp    L226
L198:
  test   $0x2,%r14b
  jne    L274
L640:
  lea    0x10(%rsp),%rcx
  movsbl %sil,%esi
  mov    %r14d,%edx
  mov    %rbp,%rdi
  call   <rangematch@plt>
  test   %eax,%eax
  je     L749
  cmp    $0x1,%eax
  je     L370
  cmp    $0xffffffff,%eax
  je     L148
L388:
  add    $0x1,%r12
  mov    %rbp,%r13
  jmp    L77
L370:
  mov    0x10(%rsp),%rbp
  jmp    L388
L148:
  mov    %rbp,%r13
  jmp    L168
L741:
  mov    %rbp,%r13
L168:
  cmp    %bl,(%r12)
  je     L494
  test   $0x10,%r14b
  je     L110
  movzbl %bl,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  movzbl (%r12),%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  jne    L12
L494:
  add    $0x1,%r12
L77:
  lea    0x1(%r13),%rbp
  movzbl 0x0(%r13),%ebx
  cmp    $0x3f,%bl
  je     L324
  jle    L214
  cmp    $0x5b,%bl
  je     L300
  cmp    $0x5c,%bl
  jne    L699
  test   $0x1,%r14b
  jne    L741
  movzbl 0x1(%r13),%eax
  test   %al,%al
  je     L558
  add    $0x2,%r13
  mov    %eax,%ebx
  jmp    L168
L558:
  mov    %rbp,%r13
  jmp    L168
L255:
  mov    $0x1,%eax
  jmp    L226
L486:
  mov    $0x1,%eax
  jmp    L226
L247:
  mov    $0x1,%eax
  jmp    L226
L521:
  mov    $0x1,%eax
  jmp    L226
L264:
  mov    $0x1,%eax
  jmp    L226
L274:
  mov    $0x1,%eax
  jmp    L226
L539:
  mov    $0x1,%eax
  jmp    L226
L749:
  mov    $0x1,%eax
  jmp    L226
L110:
  mov    $0x1,%eax
  jmp    L226
L12:
  mov    $0x1,%eax
  jmp    L226
L785:
  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;
    }
}
```