user: 请将以下的汇编代码转换成C语言代码：

```asm
<zipmapXSet>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    %r9d,-0x54(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x54(%rbp),%edx
  mov    -0x44(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <zipmapXRequiredLength@plt>
  mov    %eax,-0x24(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  cmpq   $0x0,-0x60(%rbp)
  je     L39
  mov    -0x60(%rbp),%rax
  movl   $0x0,(%rax)
L39:
  mov    -0x10(%rbp),%rdi
  lea    -0x30(%rbp),%rcx
  mov    -0x44(%rbp),%edx
  mov    -0x40(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <zipmapXLookupRaw@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L22
  mov    -0x30(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <zipmapResize@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,%eax
  lea    -0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xfd,%al
  ja     L63
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L63
L22:
  cmpq   $0x0,-0x60(%rbp)
  je     L50
  mov    -0x60(%rbp),%rax
  movl   $0x1,(%rax)
L50:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <zipmapXRawEntryLength@plt>
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jae    L63
  mov    -0x18(%rbp),%rax
  sub    -0x38(%rbp),%rax
  mov    %eax,-0x20(%rbp)
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <zipmapResize@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x30(%rbp),%eax
  mov    -0x20(%rbp),%ecx
  mov    -0x2c(%rbp),%edx
  add    %ecx,%edx
  sub    %edx,%eax
  lea    -0x1(%rax),%edx
  mov    -0x2c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x24(%rbp),%esi
  mov    -0x18(%rbp),%rax
  add    %rsi,%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
L63:
  mov    -0x2c(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x3,-0x1c(%rbp)
  jbe    L35
  mov    -0x18(%rbp),%rax
  sub    -0x38(%rbp),%rax
  mov    %eax,-0x20(%rbp)
  mov    -0x30(%rbp),%eax
  mov    -0x20(%rbp),%ecx
  mov    -0x2c(%rbp),%edx
  add    %ecx,%edx
  sub    %edx,%eax
  lea    -0x1(%rax),%edx
  mov    -0x2c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x24(%rbp),%esi
  mov    -0x18(%rbp),%rax
  add    %rsi,%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
  mov    -0x30(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <zipmapResize@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L54
L35:
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x28(%rbp)
L54:
  mov    -0x44(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <zipmapEncodeLength@plt>
  cltq
  add    %rax,-0x18(%rbp)
  mov    -0x44(%rbp),%edx
  mov    -0x40(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x44(%rbp),%eax
  add    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x48(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x4,-0x18(%rbp)
  mov    -0x54(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <zipmapEncodeLength@plt>
  cltq
  add    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0x28(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x54(%rbp),%edx
  mov    -0x50(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x38(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L67
  call   <__stack_chk_fail@plt>
L67:
  leave
  ret
```

assistant: ```c
unsigned char *zipmapXSet(unsigned char *zm, unsigned char *key, unsigned int klen, unsigned int timestamp, unsigned char *val, unsigned int vlen, int *update) {
  unsigned int zmlen, offset;
  unsigned int freelen, reqlen = zipmapXRequiredLength(klen, vlen);
  unsigned int empty, vempty;
  unsigned char *p = NULL;
  unsigned int *ts = NULL;
  freelen = reqlen;
  if (update)
    *update = 0;
  p = zipmapXLookupRaw(zm, key, klen, &zmlen, ts);
  if (p == NULL) {
    zm = zipmapResize(zm, zmlen + reqlen);
    p = zm + zmlen - 1;
    zmlen = zmlen + reqlen;
    if (zm[0] < 254)
      zm[0]++;
  } else {
    if (update)
      *update = 1;
    freelen = zipmapXRawEntryLength(p);
    if (freelen < reqlen) {
      offset = p - zm;
      zm = zipmapResize(zm, zmlen - freelen + reqlen);
      p = zm + offset;
      memmove(p + reqlen, p + freelen, zmlen - (offset + freelen + 1));
      zmlen = zmlen - freelen + reqlen;
      freelen = reqlen;
    }
  }
  empty = freelen - reqlen;
  if (empty >= 4) {
    offset = p - zm;
    memmove(p + reqlen, p + freelen, zmlen - (offset + freelen + 1));
    zmlen -= empty;
    zm = zipmapResize(zm, zmlen);
    p = zm + offset;
    vempty = 0;
  } else {
    vempty = empty;
  }
  p += zipmapEncodeLength(p, klen);
  memcpy(p, key, klen);
  p += klen;
  *(unsigned int *)p = timestamp;
  p += sizeof(unsigned int);
  p += zipmapEncodeLength(p, vlen);
  *p++ = vempty;
  memcpy(p, val, vlen);
  return zm;
}
```