user: 请从给定的汇编指令推导出C源代码:

```asm
<send_t>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %r9d,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x48,%rsp
  mov    %rcx,(%rsp)
  mov    %r8,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  mov    0x8(%rsp),%rax
  test   %rax,%rax
  je     L9
  mov    (%rsp),%rax
  test   %rax,%rax
  jne    L60
L9:
  xor    %r14d,%r14d
  jmp    L199
L130:
  cltq
  add    %rax,%r14
  cmp    %rbx,%r14
  jae    L155
L199:
  mov    %rbx,%rdx
  lea    (%r12,%r14,4),%rsi
  mov    %r13d,%ecx
  mov    %ebp,%edi
  sub    %r14,%rdx
  call   <send@plt>
  test   %eax,%eax
  jg     L130
  mov    D36(%rip),%rax
  mov    D24(%rip),%rdx
  mov    (%rax),%rax
  cmp    (%rdx),%rax
  je     L170
  mov    D60(%rip),%rdx
  cmp    (%rdx),%rax
  jne    L153
L170:
  mov    $0x64,%edi
  call   <usleep@plt>
  cmp    %rbx,%r14
  jb     L199
L155:
  mov    %r14d,%eax
L119:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L62
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L60:
  movdqa (%rsp),%xmm0
  lea    0x1(%rdi),%eax
  lea    0x1c(%rsp),%r14
  mov    %eax,(%rsp)
  lea    0x20(%rsp),%r15
  movaps %xmm0,0x20(%rsp)
  jmp    L157
  nopl   0x0(%rax)
L135:
  mov    D24(%rip),%rax
  mov    D36(%rip),%rdx
  mov    (%rax),%rax
  cmp    %rax,(%rdx)
  jne    L153
L157:
  mov    %r14,%rdi
  call   <FD_ZERO@plt>
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <FD_SET@plt>
  mov    (%rsp),%edi
  xor    %ecx,%ecx
  xor    %esi,%esi
  mov    %r15,%r8
  mov    %r14,%rdx
  call   <select@plt>
  cmp    $0xffffffff,%eax
  je     L135
  test   %eax,%eax
  je     L119
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <FD_ISSET@plt>
  test   %eax,%eax
  je     L153
  mov    D49(%rip),%r15
  xor    %r14d,%r14d
  jmp    L17
  nopl   (%rax)
L3:
  cltq
  add    %rax,%r14
L131:
  cmp    %rbx,%r14
  jae    L155
L17:
  mov    (%r15),%ecx
  mov    %rbx,%rdx
  lea    (%r12,%r14,4),%rsi
  mov    %ebp,%edi
  sub    %r14,%rdx
  or     %r13d,%ecx
  call   <send@plt>
  test   %eax,%eax
  jg     L3
  mov    D36(%rip),%rax
  mov    D24(%rip),%rdx
  mov    (%rax),%rax
  cmp    (%rdx),%rax
  je     L143
  mov    D60(%rip),%rdx
  cmp    (%rdx),%rax
  jne    L153
L143:
  mov    $0x64,%edi
  call   <usleep@plt>
  jmp    L131
  nop
L153:
  mov    $0xffffffff,%eax
  jmp    L119
L62:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int send_t(int sock, uint8_t *buf, size_t buflen, struct timeval wait, int flag) {
  int ret = -1;
  fd_set wset;
  struct timeval tv;
  size_t n = 0;
  int bytes = 0;
  if (wait.tv_sec && wait.tv_usec) {
    tv.tv_sec = wait.tv_sec;
    tv.tv_usec = wait.tv_usec;
  RE_SEND:
    FD_ZERO(&wset);
    FD_SET(sock, &wset);
    ret = select(sock + 1, (fd_set *)0, &wset, (fd_set *)0, &tv);
    if (ret == -1) {
      if (errno == EINTR) {
        goto RE_SEND;
      }
      return -1;
    } else if (ret == 0) {
      return 0;
    }
    if (!FD_ISSET(sock, &wset)) {
      return -1;
    }
    do {
      bytes = send(sock, buf + n, buflen - n, MSG_DONTWAIT | flag);
      if (bytes <= 0) {
        if (errno == EINTR || errno == EAGAIN) {
          usleep(100);
          continue;
        }
        return -1;
      }
      n += bytes;
    } while (n < buflen);
    return n;
  }
  do {
    bytes = send(sock, buf + n, buflen - n, flag);
    if (bytes <= 0) {
      if (errno == EINTR || errno == EAGAIN) {
        usleep(100);
        continue;
      }
      return -1;
    }
    n += bytes;
  } while (n < buflen);
  return n;
}
```