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

```asm
<ipc_read_fixed_size>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xa8,%rsp
  mov    %edi,-0xb4(%rbp)
  mov    %rsi,-0xc0(%rbp)
  mov    %rdx,-0xc8(%rbp)
  mov    %rcx,-0xd0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    $0x4,%edi
  call   <CMSG_SPACE@plt>
  mov    %eax,%ecx
  movslq %ecx,%rax
  sub    $0x1,%rax
  mov    %rax,-0xa8(%rbp)
  movslq %ecx,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %ecx,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  movslq %ecx,%rax
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  mov    %rsp,%rdx
  sub    %rsi,%rdx
L22:
  cmp    %rdx,%rsp
  je     L80
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L22
L80:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L83
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L83:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0xa0(%rbp)
  mov    -0xc0(%rbp),%rax
  mov    %rax,-0x78(%rbp)
  mov    -0xc8(%rbp),%rax
  mov    %rax,-0x80(%rbp)
  movq   $0x0,-0x40(%rbp)
  movq   $0x0,-0x48(%rbp)
  lea    -0x80(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  movl   $0x1,-0x70(%rbp)
  movq   $0x0,-0x58(%rbp)
  cmpq   $0x0,-0xd0(%rbp)
  je     L11
  mov    -0xa0(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    %ecx,-0x60(%rbp)
  jmp    L45
L11:
  movq   $0x0,-0x68(%rbp)
  movl   $0x0,-0x60(%rbp)
L45:
  mov    D19(%rip),%rax
  mov    (%rax),%edx
  lea    -0x70(%rbp),%rcx
  mov    -0xb4(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <recvmsg@plt>
  mov    %rax,-0x98(%rbp)
  mov    -0x98(%rbp),%rax
  cmp    -0xc8(%rbp),%rax
  je     L86
  mov    D13(%rip),%rax
  mov    (%rax),%rdx
  mov    D20(%rip),%rax
  mov    %rdx,(%rax)
  mov    D20(%rip),%rax
  mov    (%rax),%rax
  neg    %rax
  jmp    L87
L86:
  cmpq   $0x0,-0xd0(%rbp)
  je     L24
  mov    -0xa0(%rbp),%rax
  mov    %rax,-0x90(%rbp)
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <CMSG_DATA@plt>
  mov    %rax,-0x88(%rbp)
  mov    -0x88(%rbp),%rax
  mov    (%rax),%edx
  mov    -0xd0(%rbp),%rax
  mov    %edx,(%rax)
L24:
  mov    -0x98(%rbp),%rax
L87:
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L82
  call   <__stack_chk_fail@plt>
L82:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

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