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

```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     L126
  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    L74
  mov    D47(%rip),%rax
  mov    (%rax),%eax
  jmp    L44
L74:
  mov    $0x0,%eax
L44:
  mov    %eax,-0x54(%rbp)
  cmpl   $0x0,-0x58(%rbp)
  jne    L40
  mov    D14(%rip),%rax
  mov    (%rax),%eax
  or     %eax,-0x5c(%rbp)
  jmp    L126
L40:
  cmpl   $0x0,-0x58(%rbp)
  jg     L118
  mov    D24(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L76
L118:
  mov    D87(%rip),%rax
  mov    (%rax),%edx
  mov    D90(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  and    -0x68(%rbp),%eax
  or     %eax,-0x5c(%rbp)
  jmp    L126
L76:
  mov    D129(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  je     L67
  mov    D39(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  je     L67
  mov    D153(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  je     L67
  mov    D138(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L143
L67:
  mov    D14(%rip),%rax
  mov    (%rax),%eax
  or     %eax,-0x5c(%rbp)
  jmp    L126
L143:
  mov    D16(%rip),%rax
  mov    (%rax),%eax
  or     %eax,-0x5c(%rbp)
L126:
  mov    -0x78(%rbp),%rdx
  mov    -0x64(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L131
  mov    D31(%rip),%rax
  mov    (%rax),%edx
  mov    D28(%rip),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    D54(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  and    -0x68(%rbp),%eax
  or     %eax,-0x5c(%rbp)
L131:
  mov    -0x80(%rbp),%rdx
  mov    -0x64(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L157
  mov    D146(%rip),%rax
  mov    (%rax),%edx
  mov    D157(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  and    -0x68(%rbp),%eax
  or     %eax,-0x5c(%rbp)
L157:
  mov    -0x5c(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L113
  call   <__stack_chk_fail@plt>
L113:
  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
      happened |= POLLERR;
  }
  if (FD_ISSET(fd, wfds))
    happened |= (POLLOUT | POLLWRNORM | POLLWRBAND) & sought;
  if (FD_ISSET(fd, efds))
    happened |= (POLLPRI | POLLRDBAND) & sought;
  return happened;
}
```