user: What would the C source look like for the assembly code provided here:

```asm
<recv_fd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x88,%rsp
  mov    %edi,-0xa4(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movb   $0x0,-0x39(%rbp)
  lea    -0x39(%rbp),%rax
  mov    %rax,-0x80(%rbp)
  movl   $0x1,-0x78(%rbp)
  movq   $0x0,-0x70(%rbp)
  movq   $0x0,-0x68(%rbp)
  movq   $0x0,-0x60(%rbp)
  movq   $0x0,-0x58(%rbp)
  movq   $0x0,-0x50(%rbp)
  lea    -0x80(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  movl   $0x1,-0x70(%rbp)
  mov    $0x4,%edi
  call   <CMSG_SPACE@plt>
  mov    %eax,%ecx
  movslq %ecx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x90(%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
L2:
  cmp    %rdx,%rsp
  je     L12
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L2
L12:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L9
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L9:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x88(%rbp)
  mov    -0x88(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    %ecx,-0x60(%rbp)
  lea    -0x70(%rbp),%rcx
  mov    -0xa4(%rbp),%eax
  mov    $0x0,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <recvmsg@plt>
  mov    %eax,-0xa0(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <CMSG_FIRSTHDR@plt>
  mov    %rax,-0x98(%rbp)
  jmp    L83
L45:
  mov    -0x98(%rbp),%rax
  mov    (%rax),%rdx
  mov    D12(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jne    L82
  mov    -0x98(%rbp),%rax
  mov    0x8(%rax),%rdx
  mov    D17(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jne    L82
  mov    -0x98(%rbp),%rax
  mov    %rax,%rdi
  call   <CMSG_DATA@plt>
  mov    (%rax),%eax
  mov    %eax,-0x9c(%rbp)
  mov    -0x9c(%rbp),%eax
  jmp    L14
L82:
  mov    -0x98(%rbp),%rdx
  lea    -0x70(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <CMSG_NXTHDR@plt>
  mov    %rax,-0x98(%rbp)
L83:
  cmpq   $0x0,-0x98(%rbp)
  jne    L45
  mov    $0xffffffff,%eax
L14:
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L78
  call   <__stack_chk_fail@plt>
L78:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
int recv_fd(int chan) {
  char buf[1] = {0};
  struct iovec data = {.iov_base = buf, .iov_len = 1};
  struct msghdr msg = {0};
  msg.msg_iov = &data;
  msg.msg_iovlen = 1;
  char ctl_buf[CMSG_SPACE(sizeof(int))];
  msg.msg_control = ctl_buf;
  msg.msg_controllen = sizeof(ctl_buf);
  ssize_t recv_len = recvmsg(chan, &msg, 0);
  for (struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
    if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
      int fd = *(int *)CMSG_DATA(cmsg);
      return fd;
    }
  }
  return -1;
}
```