user: 下面的汇编指令对应的C源代码是什么：

```asm
<connect_nonb>:
  endbr64
  push   %r15
  push   %r14
  mov    %edx,%r14d
  xor    %edx,%edx
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    D84(%rip),%rax
  mov    (%rax),%esi
  call   <fcntl@plt>
  mov    D61(%rip),%r15
  mov    %ebp,%edi
  mov    %eax,%r12d
  mov    D76(%rip),%rax
  mov    (%r15),%esi
  mov    (%rax),%edx
  or     %r12d,%edx
  call   <fcntl@plt>
  mov    %r14d,%edx
  mov    %r13,%rsi
  mov    %ebp,%edi
  movl   $0x0,(%rsp)
  call   <connect@plt>
  test   %eax,%eax
  js     L89
  jne    L9
L49:
  mov    (%r15),%esi
  mov    %r12d,%edx
  mov    %ebp,%edi
  call   <fcntl@plt>
  mov    (%rsp),%eax
  test   %eax,%eax
  jne    L0
L17:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L75
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L89:
  mov    D53(%rip),%rax
  mov    D28(%rip),%rdx
  mov    (%rax),%eax
  cmp    %eax,(%rdx)
  jne    L24
L9:
  lea    0x8(%rsp),%r13
  lea    0xc(%rsp),%r14
  mov    %r13,%rdi
  call   <FD_ZERO@plt>
  mov    %r13,%rsi
  mov    %ebp,%edi
  call   <FD_SET@plt>
  mov    0x8(%rsp),%eax
  lea    0x1(%rbp),%edi
  mov    %r14,%rdx
  lea    0x10(%rsp),%r8
  mov    %r13,%rsi
  mov    %ebx,0x10(%rsp)
  mov    %eax,0xc(%rsp)
  xor    %eax,%eax
  test   %ebx,%ebx
  movq   $0x0,0x18(%rsp)
  cmove  %rax,%r8
  xor    %ecx,%ecx
  call   <select@plt>
  test   %eax,%eax
  je     L76
  mov    %r13,%rsi
  mov    %ebp,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  jne    L118
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <FD_ISSET@plt>
  test   %rax,%rax
  je     L22
L118:
  mov    D25(%rip),%rax
  mov    %rsp,%rcx
  lea    0x4(%rsp),%r8
  mov    %ebp,%edi
  movl   $0x4,0x4(%rsp)
  mov    (%rax),%edx
  mov    D87(%rip),%rax
  mov    (%rax),%esi
  call   <getsockopt@plt>
  test   %rax,%rax
  jns    L49
  cs nopw 0x0(%rax,%rax,1)
L24:
  mov    $0xffffffff,%eax
  jmp    L17
  nopw   0x0(%rax,%rax,1)
L22:
  xor    %edi,%edi
  call   <assert@plt>
  jmp    L49
L0:
  mov    %ebp,%edi
  call   <close@plt>
  mov    D28(%rip),%rax
  mov    (%rsp),%edx
  mov    %edx,(%rax)
  jmp    L24
L76:
  mov    %ebp,%edi
  call   <close@plt>
  mov    D12(%rip),%rax
  mov    (%rax),%edx
  mov    D28(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L17
L75:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int connect_nonb(int sockfd, const struct sockaddr *saptr, socklen_t salen, int nsec) {
  int flags, n, error;
  socklen_t len;
  fd_set rset, wset;
  struct timeval tval;
  flags = fcntl(sockfd, F_GETFL, 0);
  fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
  error = 0;
  if ((n = connect(sockfd, saptr, salen)) < 0)
    if (errno != EINPROGRESS)
      return (-1);
  if (n == 0)
    goto done;
  FD_ZERO(&rset);
  FD_SET(sockfd, &rset);
  wset = rset;
  tval.tv_sec = nsec;
  tval.tv_usec = 0;
  if ((n = select(sockfd + 1, &rset, &wset, NULL, nsec ? &tval : NULL)) == 0) {
    close(sockfd);
    errno = ETIMEDOUT;
    return (-1);
  }
  if (FD_ISSET(sockfd, &rset) || FD_ISSET(sockfd, &wset)) {
    len = sizeof(error);
    if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &error, &len) < 0)
      return (-1);
  } else
    assert(0 && "select error: sockfd not set");
done:
  fcntl(sockfd, F_SETFL, flags);
  if (error) {
    close(sockfd);
    errno = error;
    return (-1);
  }
  return (0);
}
```