user: What is the c source code of the assembly code below:

```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    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %r8,%r8
  je     L166
  test   %rcx,%rcx
  jne    L114
L166:
  xor    %r14d,%r14d
  jmp    L16
L93:
  cltq
  add    %rax,%r14
  cmp    %rbx,%r14
  jae    L97
L16:
  mov    %rbx,%rdx
  lea    (%r12,%r14,4),%rsi
  mov    %r13d,%ecx
  mov    %ebp,%edi
  sub    %r14,%rdx
  call   <send@plt>
  test   %eax,%eax
  jg     L93
  mov    D24(%rip),%rax
  mov    D45(%rip),%rdx
  mov    (%rax),%rax
  cmp    (%rdx),%rax
  je     L11
  mov    D27(%rip),%rdx
  cmp    (%rdx),%rax
  jne    L106
L11:
  mov    $0x64,%edi
  call   <usleep@plt>
  cmp    %rbx,%r14
  jb     L16
L97:
  mov    %r14d,%eax
L84:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L204
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L114:
  lea    0x1(%rdi),%eax
  mov    %r8,0x28(%rsp)
  lea    0x1c(%rsp),%r14
  mov    %rcx,0x20(%rsp)
  lea    0x20(%rsp),%r15
  mov    %eax,0xc(%rsp)
  jmp    L202
  nopl   (%rax)
L24:
  mov    D45(%rip),%rax
  mov    D24(%rip),%rdx
  mov    (%rax),%rax
  cmp    %rax,(%rdx)
  jne    L106
L202:
  mov    %r14,%rdi
  call   <FD_ZERO@plt>
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <FD_SET@plt>
  mov    0xc(%rsp),%edi
  xor    %ecx,%ecx
  xor    %esi,%esi
  mov    %r15,%r8
  mov    %r14,%rdx
  call   <select@plt>
  cmp    $0xffffffff,%eax
  je     L24
  test   %eax,%eax
  je     L84
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <FD_ISSET@plt>
  test   %eax,%eax
  je     L106
  mov    D3(%rip),%r15
  xor    %r14d,%r14d
  jmp    L95
  cs nopw 0x0(%rax,%rax,1)
L27:
  cltq
  add    %rax,%r14
L138:
  cmp    %rbx,%r14
  jae    L97
L95:
  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     L27
  mov    D24(%rip),%rax
  mov    D45(%rip),%rdx
  mov    (%rax),%rax
  cmp    (%rdx),%rax
  je     L87
  mov    D27(%rip),%rdx
  cmp    (%rdx),%rax
  jne    L106
L87:
  mov    $0x64,%edi
  call   <usleep@plt>
  jmp    L138
  nopw   0x0(%rax,%rax,1)
L106:
  mov    $0xffffffff,%eax
  jmp    L84
L204:
  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;
}
```