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

```asm
<parse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  cmpq   $0x0,-0x58(%rbp)
  jne    L98
  movq   $0x0,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L4
L98:
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x60(%rbp)
  jne    L131
  movq   $0x0,0x10(%rbp)
L131:
  cmpq   $0x0,0x10(%rbp)
  je     L33
  mov    -0x60(%rbp),%rcx
  mov    -0x30(%rbp),%rax
  mov    0x10(%rbp),%rdx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L33:
  mov    0x10(%rbp),%rax
  add    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movb   $0x0,(%rax)
  mov    -0x20(%rbp),%rax
  mov    0x10(%rbp),%rdx
  mov    $0x3b,%esi
  mov    %rax,%rdi
  call   <memchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L153
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L45
L153:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,0x10(%rbp)
  je     L88
  mov    -0x60(%rbp),%rcx
  mov    -0x30(%rbp),%rax
  mov    0x10(%rbp),%rdx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L88:
  mov    0x10(%rbp),%rax
  add    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movb   $0x0,(%rax)
L45:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,0x18(%rbp)
  jne    L48
  movq   $0x0,0x20(%rbp)
L48:
  cmpq   $0x0,0x20(%rbp)
  je     L55
  mov    0x20(%rbp),%rdx
  mov    0x18(%rbp),%rcx
  mov    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L55:
  mov    0x20(%rbp),%rax
  add    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movb   $0x0,(%rax)
  mov    0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    $0x3b,%esi
  mov    %rax,%rdi
  call   <memchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L114
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  jmp    L4
L114:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,0x10(%rbp)
  je     L62
  mov    -0x60(%rbp),%rcx
  mov    -0x30(%rbp),%rax
  mov    0x10(%rbp),%rdx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L62:
  mov    0x10(%rbp),%rax
  add    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movb   $0x0,(%rax)
L4:
  cmpq   $0x0,-0x38(%rbp)
  je     L11
  mov    -0x38(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
L11:
  cmpq   $0x0,-0x40(%rbp)
  je     L78
  mov    -0x40(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
L78:
  cmpq   $0x0,-0x48(%rbp)
  je     L113
  mov    -0x48(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
L113:
  cmpq   $0x0,-0x50(%rbp)
  je     L32
  mov    -0x50(%rbp),%rax
  mov    -0x28(%rbp),%rdx
  mov    %rdx,(%rax)
  nop
L32:
  nop
  leave
  ret
```

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