user: 这段汇编代码用C语言表示是什么样的:

```asm
<poll>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x48(%rbp)
  jne    L106
  cmpq   $0x0,-0x50(%rbp)
  je     L106
  mov    D11(%rip),%rax
  mov    (%rax),%edx
  mov    D23(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L287
L106:
  cmpl   $0x0,-0x54(%rbp)
  jne    L51
  lea    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x20(%rbp),%rax
  movl   $0x0,0x4(%rax)
  jmp    L1
L51:
  cmpl   $0x0,-0x54(%rbp)
  jle    L23
  lea    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x10624dd3,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x6,%edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x10624dd3,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x6,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x3e8,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  imul   $0x3e8,%edx,%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,0x4(%rax)
  jmp    L1
L23:
  cmpl   $0xffffffff,-0x54(%rbp)
  jne    L11
  movq   $0x0,-0x20(%rbp)
  jmp    L1
L11:
  mov    D6(%rip),%rax
  mov    (%rax),%edx
  mov    D23(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L287
L1:
  movl   $0xffffffff,-0x2c(%rbp)
  lea    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <FD_ZERO@plt>
  lea    -0x34(%rbp),%rax
  mov    %rax,%rdi
  call   <FD_ZERO@plt>
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <FD_ZERO@plt>
  movq   $0x0,-0x18(%rbp)
  jmp    L160
L129:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L49
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    0x4(%rax),%eax
  and    $0x41,%eax
  test   %eax,%eax
  je     L27
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  lea    -0x38(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_SET@plt>
L27:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    0x4(%rax),%eax
  and    $0x304,%eax
  test   %eax,%eax
  je     L29
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  lea    -0x34(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_SET@plt>
L29:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    0x4(%rax),%eax
  and    $0x82,%eax
  test   %eax,%eax
  je     L177
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  lea    -0x30(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_SET@plt>
L177:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x2c(%rbp)
  jg     L101
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    0x4(%rax),%eax
  and    $0x3c7,%eax
  test   %eax,%eax
  je     L101
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x2c(%rbp)
  mov    D60(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x2c(%rbp)
  jle    L101
  mov    D65(%rip),%rax
  mov    (%rax),%edx
  mov    D23(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L287
L49:
  nop
L101:
  addq   $0x1,-0x18(%rbp)
L160:
  mov    -0x18(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jb     L129
  mov    -0x2c(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x20(%rbp),%rsi
  lea    -0x30(%rbp),%rcx
  lea    -0x34(%rbp),%rdx
  lea    -0x38(%rbp),%rax
  mov    %rsi,%r8
  mov    %rax,%rsi
  call   <select@plt>
  mov    %eax,-0x28(%rbp)
  cmpl   $0x0,-0x28(%rbp)
  jns    L207
  mov    -0x28(%rbp),%eax
  jmp    L287
L207:
  movl   $0x0,-0x28(%rbp)
  movq   $0x0,-0x18(%rbp)
  jmp    L270
L55:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L108
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,0x8(%rax)
  jmp    L259
L108:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    0x4(%rax),%esi
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  lea    -0x30(%rbp),%rdi
  lea    -0x34(%rbp),%rcx
  lea    -0x38(%rbp),%rdx
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <compute_revents@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L225
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,0x8(%rdx)
  addl   $0x1,-0x28(%rbp)
  jmp    L259
L225:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,0x8(%rax)
L259:
  addq   $0x1,-0x18(%rbp)
L270:
  mov    -0x18(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jb     L55
  mov    -0x28(%rbp),%eax
L287:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L239
  call   <__stack_chk_fail@plt>
L239:
  leave
  ret
```

assistant: ```c
int poll(struct pollfd *pfd, nfds_t nfd, int timeout) {
  fd_set rfds, wfds, efds;
  struct timeval tv;
  struct timeval *ptv;
  int maxfd, rc;
  nfds_t i;
  if (!pfd && nfd) {
    errno = EFAULT;
    return -1;
  }
  if (timeout == 0) {
    ptv = &tv;
    ptv->tv_sec = 0;
    ptv->tv_usec = 0;
  } else if (timeout > 0) {
    ptv = &tv;
    ptv->tv_sec = timeout / 1000;
    ptv->tv_usec = (timeout % 1000) * 1000;
  } else if (timeout == (-1))
    ptv = NULL;
  else {
    errno = EINVAL;
    return -1;
  }
  maxfd = -1;
  FD_ZERO(&rfds);
  FD_ZERO(&wfds);
  FD_ZERO(&efds);
  for (i = 0; i < nfd; i++) {
    if (pfd[i].fd < 0)
      continue;
    if (pfd[i].events & (0x0001 | 0x0040))
      FD_SET(pfd[i].fd, &rfds);
    if (pfd[i].events & (0x0004 | 0x0100 | 0x0200))
      FD_SET(pfd[i].fd, &wfds);
    if (pfd[i].events & (0x0002 | 0x0080))
      FD_SET(pfd[i].fd, &efds);
    if (pfd[i].fd >= maxfd && (pfd[i].events & (0x0001 | 0x0004 | 0x0002 | 0x0040 | 0x0080 | 0x0100 | 0x0200))) {
      maxfd = pfd[i].fd;
      if (maxfd > FD_SETSIZE) {
        errno = EOVERFLOW;
        return -1;
      }
    }
  }
  rc = select(maxfd + 1, &rfds, &wfds, &efds, ptv);
  if (rc < 0)
    return rc;
  rc = 0;
  for (i = 0; i < nfd; i++)
    if (pfd[i].fd < 0)
      pfd[i].revents = 0;
    else {
      int happened = compute_revents(pfd[i].fd, pfd[i].events, &rfds, &wfds, &efds);
      if (happened) {
        pfd[i].revents = happened;
        rc++;
      } else {
        pfd[i].revents = 0;
      }
    }
  return rc;
}
```