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

```asm
<usys_select>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%r14
  mov    %rsi,0x10(%rsp)
  mov    %edx,%ebx
  mov    %rcx,%r12
  mov    %r8d,%r15d
  mov    %r8d,0x1c(%rsp)
  mov    %r9,%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x28(%rsp),%rdi
  call   <FD_ZERO@plt>
  lea    0x2c(%rsp),%rdi
  call   <FD_ZERO@plt>
  movq   $0x0,0x38(%rsp)
  imul   $0x3e8,%ebx,%ebx
  mov    %ebx,0x30(%rsp)
  mov    (%r12),%ebx
  test   %r15d,%r15d
  jle    L0
  mov    %r15d,%eax
  lea    (%r12,%rax,4),%r15
  mov    %r12,%rbp
  lea    0x28(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L216
L83:
  mov    0x0(%rbp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  add    $0x4,%rbp
  cmp    %r15,%rbp
  je     L0
L216:
  mov    0x0(%rbp),%edi
  test   %edi,%edi
  js     L83
  mov    0x8(%rsp),%rsi
  call   <FD_SET@plt>
  jmp    L83
L0:
  cmpl   $0x0,0x90(%rsp)
  jle    L179
  mov    0x90(%rsp),%eax
  lea    0x0(%r13,%rax,4),%r15
  mov    %r13,%rbp
  lea    0x2c(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L218
L18:
  mov    0x0(%rbp),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  add    $0x4,%rbp
  cmp    %r15,%rbp
  je     L179
L218:
  mov    0x0(%rbp),%edi
  test   %edi,%edi
  js     L18
  mov    0x8(%rsp),%rsi
  call   <FD_SET@plt>
  jmp    L18
L179:
  lea    0x2c(%rsp),%rdx
  lea    0x28(%rsp),%rsi
  lea    0x1(%rbx),%edi
  lea    0x30(%rsp),%r8
  mov    $0x0,%ecx
  call   <select@plt>
  test   %eax,%eax
  js     L159
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L52
  mov    %eax,%ebp
  mov    $0x0,%ebx
  lea    0x28(%rsp),%r15
  jmp    L11
L8:
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L52
L11:
  mov    (%r12,%rbx,4),%edi
  mov    %r15,%rsi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L8
  mov    $0x1,%eax
  mov    %ebx,%ecx
  shl    %cl,%eax
  or     %eax,(%r14)
  jmp    L8
L52:
  cmpl   $0x0,0x90(%rsp)
  jle    L159
  mov    0x90(%rsp),%r12d
  mov    $0x0,%ebx
  lea    0x2c(%rsp),%rbp
  jmp    L100
L68:
  add    $0x1,%rbx
  cmp    %rbx,%r12
  je     L159
L100:
  mov    0x0(%r13,%rbx,4),%edi
  mov    %rbp,%rsi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L68
  mov    $0x1,%eax
  mov    %ebx,%ecx
  shl    %cl,%eax
  mov    0x10(%rsp),%rdx
  or     %eax,(%rdx)
  jmp    L68
L159:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L55
  mov    $0x0,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L55:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
uint32_t usys_select(uint32_t *rmask, uint32_t *wmask, int time, int *reads, int nreads, int *writes, int nwrites) {
  int *sock_p, max_fd, err;
  fd_set readfds, writefds;
  struct timeval tv;
  FD_ZERO(&readfds);
  FD_ZERO(&writefds);
  tv.tv_sec = 0;
  tv.tv_usec = (time * 1000);
  sock_p = reads;
  max_fd = *sock_p;
  for (int i = 0; i < nreads; i++) {
    if (*sock_p >= 0)
      FD_SET(*sock_p, &readfds);
    if (*sock_p > max_fd)
      max_fd = *sock_p;
    sock_p++;
  }
  sock_p = writes;
  for (int i = 0; i < nwrites; i++) {
    if (*sock_p >= 0)
      FD_SET(*sock_p, &writefds);
    if (*sock_p > max_fd)
      max_fd = *sock_p;
    sock_p++;
  }
  err = select(max_fd + 1, &readfds, &writefds, NULL, &tv);
  if (err < 0)
    return 0;
  sock_p = reads;
  for (int i = 0; i < nreads; i++) {
    if (FD_ISSET(*sock_p, &readfds))
      *rmask |= (0x01 << i);
    sock_p++;
  }
  sock_p = writes;
  for (int i = 0; i < nwrites; i++) {
    if (FD_ISSET(*sock_p, &writefds))
      *wmask |= (0x01 << i);
    sock_p++;
  }
  return 0;
}
```