user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<checkfd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    D69(%rip),%rax
  mov    (%rax),%ecx
  movslq %ecx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  movslq %ecx,%rax
  mov    %rax,%r10
  mov    $0x0,%r11d
  movslq %ecx,%rax
  mov    %rax,%r8
  mov    $0x0,%r9d
  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
L3:
  cmp    %rdx,%rsp
  je     L122
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L3
L122:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L38
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L38:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%edx
  mov    D30(%rip),%rax
  mov    (%rax),%esi
  mov    D39(%rip),%rax
  mov    (%rax),%eax
  or     %eax,%esi
  mov    D5(%rip),%rax
  mov    (%rax),%eax
  or     %esi,%eax
  and    %edx,%eax
  test   %eax,%eax
  je     L43
  mov    $0xffffffff,%eax
  jmp    L108
L43:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%edx
  mov    D72(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  jne    L83
  mov    $0x0,%eax
  jmp    L108
L83:
  mov    D66(%rip),%rax
  movq   $0x0,(%rax)
  mov    -0x48(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    -0x20(%rbp),%rsi
  mov    %ecx,%edx
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x38(%rbp)
  cmpl   $0x0,-0x38(%rbp)
  jg     L74
  mov    D66(%rip),%rax
  mov    (%rax),%rdx
  mov    D6(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  je     L50
  mov    $0xffffffff,%eax
  jmp    L108
L50:
  mov    $0x0,%eax
  jmp    L108
L74:
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L53
L109:
  mov    -0x38(%rbp),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x4c(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    %eax,-0x34(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  jg     L103
  mov    $0xffffffff,%eax
  jmp    L108
L103:
  mov    -0x34(%rbp),%eax
  sub    %eax,-0x38(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  add    %rax,-0x30(%rbp)
L53:
  cmpl   $0x0,-0x38(%rbp)
  jne    L109
  mov    $0x0,%eax
L108:
  mov    %rbx,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L28
  call   <__stack_chk_fail@plt>
L28:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int checkfd(struct pollfd *fdp, int outfd) {
  int nr, nw;
  char buf[BUFSIZ];
  if (fdp->revents & (POLLNVAL | POLLERR | POLLHUP))
    return -1;
  if ((fdp->revents & POLLIN) == 0)
    return 0;
  errno = 0;
  nr = read(fdp->fd, buf, sizeof buf);
  if (nr <= 0) {
    if (errno != EAGAIN)
      return -1;
    else
      return 0;
  } else {
    char *bc = buf;
    while (nr) {
      if ((nw = write(outfd, bc, nr)) <= 0)
        return -1;
      nr -= nw;
      bc += nw;
    }
    return 0;
  }
}
```