user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<ipc_write_fixed_size>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r12
  push   %rbx
  sub    $0xb0,%rsp
  mov    %edi,-0xa4(%rbp)
  mov    %rsi,-0xb0(%rbp)
  mov    %rdx,-0xb8(%rbp)
  mov    %ecx,-0xa8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%r12
  mov    $0x4,%edi
  call   <CMSG_SPACE@plt>
  mov    %eax,%ebx
  movslq %ebx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x98(%rbp)
  movslq %ebx,%rax
  mov    %rax,-0xd0(%rbp)
  movq   $0x0,-0xc8(%rbp)
  movslq %ebx,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %ebx,%rax
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L34:
  cmp    %rdx,%rsp
  je     L72
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L34
L72:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L13
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L13:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x90(%rbp)
  mov    -0x90(%rbp),%rax
  mov    %rax,-0x88(%rbp)
  mov    -0xb0(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    -0xb8(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  mov    $0x4,%edi
  call   <CMSG_LEN@plt>
  mov    -0x88(%rbp),%rdx
  mov    %eax,0x8(%rdx)
  mov    D25(%rip),%rax
  mov    (%rax),%edx
  mov    -0x88(%rbp),%rax
  mov    %edx,0x4(%rax)
  mov    D4(%rip),%rax
  mov    (%rax),%edx
  mov    -0x88(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <CMSG_DATA@plt>
  mov    %rax,-0x80(%rbp)
  mov    -0x80(%rbp),%rax
  mov    -0xa8(%rbp),%edx
  mov    %edx,(%rax)
  lea    -0x60(%rbp),%rax
  mov    $0x38,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x38(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x1,-0x60(%rbp)
  movq   $0x0,-0x48(%rbp)
  cmpl   $0x0,-0xa8(%rbp)
  js     L58
  mov    -0x90(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  mov    %ebx,-0x50(%rbp)
  jmp    L26
L58:
  movq   $0x0,-0x58(%rbp)
  movl   $0x0,-0x50(%rbp)
L26:
  mov    D38(%rip),%rax
  mov    (%rax),%edx
  lea    -0x60(%rbp),%rcx
  mov    -0xa4(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <sendmsg@plt>
  mov    %rax,-0x78(%rbp)
  mov    -0x78(%rbp),%rax
  cmp    -0xb8(%rbp),%rax
  je     L28
  mov    D23(%rip),%rax
  mov    (%rax),%rdx
  mov    D48(%rip),%rax
  mov    %rdx,(%rax)
  mov    D48(%rip),%rax
  mov    (%rax),%rax
  neg    %rax
  jmp    L56
L28:
  mov    -0x78(%rbp),%rax
L56:
  mov    %r12,%rsp
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L46
  call   <__stack_chk_fail@plt>
L46:
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
ssize_t ipc_write_fixed_size(int fd, void *buf, ssize_t remain, int ram_fd) {
  struct iovec iov;
  char cmsgbuf[CMSG_SPACE(sizeof(int))];
  struct cmsghdr *cmsg = (struct cmsghdr *)cmsgbuf;
  ssize_t total;
  int *p;
  struct msghdr msg;
  iov.iov_base = buf;
  iov.iov_len = remain;
  cmsg->cmsg_len = CMSG_LEN(sizeof(int));
  cmsg->cmsg_level = SOL_SOCKET;
  cmsg->cmsg_type = SCM_RIGHTS;
  p = (int *)CMSG_DATA(cmsg);
  *p = ram_fd;
  memset(&msg, 0, sizeof(msg));
  msg.msg_name = NULL;
  msg.msg_namelen = 0;
  msg.msg_iov = &iov;
  msg.msg_iovlen = 1;
  msg.msg_flags = 0;
  if (ram_fd >= 0) {
    msg.msg_control = cmsgbuf;
    msg.msg_controllen = sizeof(cmsgbuf);
  } else {
    msg.msg_control = NULL;
    msg.msg_controllen = 0;
  }
  total = sendmsg(fd, &msg, MSG_NOSIGNAL);
  if (total != remain) {
    errno = EFAULT;
    return -errno;
  }
  return total;
}
```