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

```asm
<compute_revents>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %esi,-0x68(%rbp)
  mov    %rdx,-0x70(%rbp)
  mov    %rcx,-0x78(%rbp)
  mov    %r8,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x5c(%rbp)
  mov    -0x70(%rbp),%rdx
  mov    -0x64(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L32
  lea    -0x50(%rbp),%rsi
  mov    -0x64(%rbp),%eax
  mov    $0x0,%ecx
  mov    $0x40,%edx
  mov    %eax,%edi
  call   <recv@plt>
  mov    %eax,-0x58(%rbp)
  cmpl   $0x0,-0x58(%rbp)
  jns    L152
  mov    D175(%rip),%rax
  mov    (%rax),%eax
  jmp    L85
L152:
  mov    $0x0,%eax
L85:
  mov    %eax,-0x54(%rbp)
  cmpl   $0x0,-0x58(%rbp)
  jne    L98
  mov    D57(%rip),%rax
  mov    (%rax),%eax
  or     %eax,-0x5c(%rbp)
  jmp    L32
L98:
  cmpl   $0x0,-0x58(%rbp)
  jg     L56
  mov    D188(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L168
L56:
  mov    D116(%rip),%rax
  mov    (%rax),%edx
  mov    D56(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  and    -0x68(%rbp),%eax
  or     %eax,-0x5c(%rbp)
  jmp    L32
L168:
  mov    D31(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  je     L101
  mov    D46(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  je     L101
  mov    D126(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  je     L101
  mov    D17(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L62
L101:
  mov    D57(%rip),%rax
  mov    (%rax),%eax
  or     %eax,-0x5c(%rbp)
  jmp    L32
L62:
  mov    D125(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L114
  mov    D116(%rip),%rax
  mov    (%rax),%edx
  mov    D56(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  and    -0x68(%rbp),%eax
  or     %eax,-0x5c(%rbp)
  jmp    L32
L114:
  mov    D154(%rip),%rax
  mov    (%rax),%eax
  or     %eax,-0x5c(%rbp)
L32:
  mov    -0x78(%rbp),%rdx
  mov    -0x64(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L47
  mov    D85(%rip),%rax
  mov    (%rax),%edx
  mov    D157(%rip),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    D117(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  and    -0x68(%rbp),%eax
  or     %eax,-0x5c(%rbp)
L47:
  mov    -0x80(%rbp),%rdx
  mov    -0x64(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L52
  mov    D69(%rip),%rax
  mov    (%rax),%edx
  mov    D137(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  and    -0x68(%rbp),%eax
  or     %eax,-0x5c(%rbp)
L52:
  mov    -0x5c(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L13
  call   <__stack_chk_fail@plt>
L13:
  leave
  ret
```

assistant: ```c
int compute_revents(int fd, int sought, fd_set *rfds, fd_set *wfds, fd_set *efds) {
  int happened = 0;
  if (FD_ISSET(fd, rfds)) {
    int r;
    int socket_errno;
    char data[64];
    r = recv(fd, data, sizeof(data), 0);
    socket_errno = (r < 0) ? errno : 0;
    if (r == 0)
      happened |= POLLHUP;
    else if (r > 0 || (socket_errno == ENOTCONN))
      happened |= (POLLIN | POLLRDNORM) & sought;
    else if (socket_errno == ESHUTDOWN || socket_errno == ECONNRESET || socket_errno == ECONNABORTED || socket_errno == ENETRESET)
      happened |= POLLHUP;
    else if (socket_errno == ENOTSOCK)
      happened |= (POLLIN | POLLRDNORM) & sought;
    else
      happened |= POLLERR;
  }
  if (FD_ISSET(fd, wfds))
    happened |= (POLLOUT | POLLWRNORM | POLLWRBAND) & sought;
  if (FD_ISSET(fd, efds))
    happened |= (POLLPRI | POLLRDBAND) & sought;
  return happened;
}
```