user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<parse>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %rcx,%r14
  mov    %r8,%rbx
  mov    %r9,0x10(%rsp)
  test   %r8,%r8
  je     L147
  test   %r9,%r9
  je     L142
  cmpq   $0x0,0x60(%rsp)
  jne    L146
L142:
  lea    0x1(%rbx),%rbp
  movb   $0x0,(%rbx)
  mov    $0x0,%edx
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  call   <memchr@plt>
  movq   $0x0,0x60(%rsp)
  test   %rax,%rax
  je     L79
L3:
  movb   $0x0,(%rax)
  add    $0x1,%rax
  mov    %rax,0x8(%rsp)
L8:
  cmpq   $0x0,0x68(%rsp)
  je     L9
  cmpq   $0x0,0x70(%rsp)
  jne    L172
L49:
  mov    %rbp,%r15
  add    0x70(%rsp),%r15
  movb   $0x0,(%r15)
  mov    0x70(%rsp),%rdx
  mov    $0x3b,%esi
  mov    %rbp,%rdi
  call   <memchr@plt>
  test   %rax,%rax
  je     L128
  movb   $0x0,(%rax)
  add    $0x1,%rax
L143:
  mov    (%rsp),%rcx
  test   %rcx,%rcx
  je     L83
  mov    %rbx,(%rcx)
L83:
  test   %r12,%r12
  je     L94
  mov    0x8(%rsp),%rdx
  mov    %rdx,(%r12)
L94:
  test   %r13,%r13
  je     L101
  mov    %rbp,0x0(%r13)
L101:
  test   %r14,%r14
  je     L112
  mov    %rax,(%r14)
L112:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L146:
  mov    0x60(%rsp),%rdx
  mov    %r9,%rsi
  mov    %r8,%rdi
  call   <memcpy@plt>
  mov    %rbx,%rax
  add    0x60(%rsp),%rax
  lea    0x1(%rax),%rbp
  movb   $0x0,(%rax)
  mov    0x60(%rsp),%rdx
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  call   <memchr@plt>
  test   %rax,%rax
  jne    L3
  mov    0x60(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
L79:
  mov    %rbp,%rax
  add    0x60(%rsp),%rax
  movb   $0x0,(%rax)
  mov    %rbp,0x8(%rsp)
  lea    0x1(%rax),%rbp
  jmp    L8
L172:
  mov    0x70(%rsp),%rdx
  mov    0x68(%rsp),%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  jmp    L49
L9:
  movq   $0x0,0x70(%rsp)
  jmp    L49
L128:
  lea    0x1(%r15),%rax
  mov    %rax,0x18(%rsp)
  cmpq   $0x0,0x60(%rsp)
  jne    L159
L80:
  mov    0x60(%rsp),%rax
  movb   $0x0,0x1(%r15,%rax,1)
  mov    %rbp,%rax
  mov    0x18(%rsp),%rbp
  jmp    L143
L159:
  mov    0x60(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  jmp    L80
L147:
  mov    %r8,%rbp
  mov    %r8,0x8(%rsp)
  mov    %r8,%rax
  jmp    L143
```

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;
}
```