user: Please show me the C implementation that matches the assembly code listed below:

```asm
<parse>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x28,%rsp
  mov    %rdi,(%rsp)
  mov    0x70(%rsp),%r15
  mov    %r9,0x18(%rsp)
  test   %r8,%r8
  je     L92
  test   %r9,%r9
  je     L19
  cmpq   $0x0,0x60(%rsp)
  jne    L97
L19:
  movb   $0x0,(%rbx)
  xor    %edx,%edx
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  lea    0x1(%rbx),%r14
  call   <memchr@plt>
  movq   $0x0,0x60(%rsp)
  test   %rax,%rax
  je     L60
L146:
  movb   $0x0,(%rax)
  add    $0x1,%rax
  mov    %rax,0x8(%rsp)
L109:
  cmpq   $0x0,0x68(%rsp)
  je     L11
  test   %r15,%r15
  jne    L95
L11:
  mov    %r14,%r9
  xor    %r15d,%r15d
L180:
  movb   $0x0,(%r9)
  mov    %r15,%rdx
  mov    $0x3b,%esi
  mov    %r14,%rdi
  mov    %r9,0x10(%rsp)
  call   <memchr@plt>
  mov    0x10(%rsp),%r9
  test   %rax,%rax
  je     L181
  movb   $0x0,(%rax)
  add    $0x1,%rax
L172:
  mov    (%rsp),%rcx
  test   %rcx,%rcx
  je     L3
  mov    %rbx,(%rcx)
L3:
  test   %rbp,%rbp
  je     L158
  mov    0x8(%rsp),%rbx
  mov    %rbx,0x0(%rbp)
L158:
  test   %r12,%r12
  je     L162
  mov    %r14,(%r12)
L162:
  test   %r13,%r13
  je     L166
  mov    %rax,0x0(%r13)
L166:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L181:
  cmpq   $0x0,0x60(%rsp)
  lea    0x1(%r9),%r15
  jne    L142
L102:
  mov    0x60(%rsp),%rax
  movb   $0x0,(%r15,%rax,1)
  mov    %r14,%rax
  mov    %r15,%r14
  jmp    L172
  nopw   0x0(%rax,%rax,1)
L95:
  mov    0x68(%rsp),%rsi
  mov    %r15,%rdx
  mov    %r14,%rdi
  call   <memcpy@plt>
  lea    (%r14,%r15,1),%r9
  jmp    L180
  nopl   0x0(%rax)
L97:
  mov    0x60(%rsp),%rdx
  mov    %r9,%rsi
  mov    %r8,%rdi
  call   <memcpy@plt>
  mov    0x60(%rsp),%rax
  mov    0x60(%rsp),%rdx
  mov    %rbx,%rdi
  mov    $0x3b,%esi
  add    %rbx,%rax
  movb   $0x0,(%rax)
  lea    0x1(%rax),%r14
  call   <memchr@plt>
  test   %rax,%rax
  jne    L146
  mov    0x60(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    0x60(%rsp),%rax
  add    %r14,%rax
L54:
  mov    %r14,0x8(%rsp)
  lea    0x1(%rax),%r14
  movb   $0x0,(%rax)
  jmp    L109
  nopl   (%rax)
L60:
  mov    %r14,%rax
  jmp    L54
  nopl   (%rax)
L142:
  mov    0x60(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  mov    %r15,%rdi
  call   <memcpy@plt>
  jmp    L102
  nop
L92:
  movq   $0x0,0x8(%rsp)
  xor    %r14d,%r14d
  xor    %eax,%eax
  jmp    L172
```

assistant: ```c
void parse(char **x, char **y, char **z, char **d, char *buf, const char *nam, size_t nlen, const char *val, size_t vlen) {
  char *bptr, *dd, *ptr, *xx, *yy, *zz;
  if (!buf) {
    xx = yy = zz = dd = NULL;
    goto done;
  }
  bptr = buf;
  xx = bptr;
  if (!nam)
    nlen = 0;
  if (nlen)
    memcpy(bptr, nam, nlen);
  bptr += nlen;
  *bptr++ = '\0';
  ptr = memchr(xx, ';', nlen);
  if (ptr) {
    *ptr = '\0';
    yy = ptr + 1;
  } else {
    yy = bptr;
    if (nlen)
      memcpy(bptr, nam, nlen);
    bptr += nlen;
    *bptr++ = '\0';
  }
  dd = bptr;
  if (!val)
    vlen = 0;
  if (vlen)
    memcpy(bptr, val, vlen);
  bptr += vlen;
  *bptr++ = '\0';
  ptr = memchr(dd, ';', vlen);
  if (ptr) {
    *ptr = '\0';
    zz = dd;
    dd = ptr + 1;
  } else {
    zz = bptr;
    if (nlen)
      memcpy(bptr, nam, nlen);
    bptr += nlen;
    *bptr++ = '\0';
  }
done:
  if (x)
    *x = xx;
  if (y)
    *y = yy;
  if (z)
    *z = zz;
  if (d)
    *d = dd;
  return;
}
```