user: What is the c source code of the assembly code below:

```asm
<fnmatch>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  and    $0x4,%ebp
  sub    $0x18,%rsp
  and    $0x2,%edx
  mov    %rdi,0x8(%rsp)
  mov    %rsi,(%rsp)
  je     L253
  mov    %rdi,%rax
  xor    %ebx,%ebx
  xor    %r13d,%r13d
  mov    %rsp,%r15
  cmpb   $0x2a,(%rax)
  lea    0x8(%rsp),%r14
  je     L262
L64:
  xor    %eax,%eax
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <fnmatch_helper@plt>
  test   %eax,%eax
  je     L10
L207:
  test   %r13,%r13
  je     L115
  test   %rbx,%rbx
  je     L115
  movzbl (%rbx),%eax
  test   %ebp,%ebp
  jne    L290
  cmp    $0x2e,%al
  je     L115
L290:
  cmp    $0x2f,%al
  je     L29
  test   %al,%al
  je     L115
  xchg   %ax,%ax
L212:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  je     L115
  cmp    $0x2f,%al
  jne    L212
L29:
  test   %al,%al
  je     L115
  add    $0x1,%rbx
  mov    %r13,%rax
  mov    %rbx,%rsi
L151:
  mov    %rax,0x8(%rsp)
  mov    %rsi,(%rsp)
  cmpb   $0x2a,(%rax)
  jne    L64
L262:
  cmpb   $0x2a,0x1(%rax)
  jne    L64
  cmpb   $0x2f,0x2(%rax)
  jne    L64
  add    $0x3,%rax
  jmp    L213
  xchg   %ax,%ax
L243:
  cmpb   $0x2a,0x1(%rax)
  jne    L73
  add    $0x3,%rax
  cmpb   $0x2f,-0x1(%rax)
  jne    L73
L213:
  mov    %rax,0x8(%rsp)
  cmpb   $0x2a,(%rax)
  mov    %rax,%r13
  je     L243
L73:
  mov    (%rsp),%rbx
  jmp    L64
  cs nopw 0x0(%rax,%rax,1)
L115:
  mov    $0x1,%eax
L116:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L10:
  mov    (%rsp),%rsi
  movzbl (%rsi),%ecx
  test   %cl,%cl
  je     L180
  cmp    $0x2f,%cl
  je     L180
  lea    0x1(%rsi),%rdx
  jmp    L245
  xchg   %ax,%ax
L248:
  cmp    $0x2f,%cl
  je     L180
L245:
  mov    %rdx,(%rsp)
  movzbl (%rdx),%ecx
  mov    %rdx,%rsi
  add    $0x1,%rdx
  test   %cl,%cl
  jne    L248
L180:
  mov    0x8(%rsp),%rdx
  cmpb   $0x0,(%rdx)
  jne    L175
  test   %cl,%cl
  jne    L207
  jmp    L116
  nopl   0x0(%rax,%rax,1)
L175:
  lea    0x1(%rdx),%rax
  add    $0x1,%rsi
  test   %cl,%cl
  je     L207
  jmp    L151
  nopl   (%rax)
L253:
  mov    %rsp,%rsi
  lea    0x8(%rsp),%rdi
  mov    %r12d,%edx
  xor    %eax,%eax
  call   <fnmatch_helper@plt>
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int fnmatch(p, s, flags) const char *p;
const char *s;
int flags;
{
  const int period = !(flags & 0x04);
  const int pathname = flags & 0x02;
  const char *ptmp = 0;
  const char *stmp = 0;
  if (pathname) {
    while (1) {
      if (p[0] == '*' && p[1] == '*' && p[2] == '/') {
        do {
          p += 3;
        } while (p[0] == '*' && p[1] == '*' && p[2] == '/');
        ptmp = p;
        stmp = s;
      }
      if (fnmatch_helper(&p, &s, flags) == 0) {
        while (*s && *s != '/')
          (++(s));
        if (*p && *s) {
          p++;
          s++;
          continue;
        }
        if (!*p && !*s)
          return 0;
      }
      if (ptmp && stmp && !(period && *stmp == '.')) {
        while (*stmp && *stmp != '/')
          (++(stmp));
        if (*stmp) {
          p = ptmp;
          stmp++;
          s = stmp;
          continue;
        }
      }
      return 1;
    }
  } else
    return fnmatch_helper(&p, &s, flags);
}
```