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

```asm
<ss_connect_to_ipv4_host_impl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r14
  mov    %rsi,%r13
  mov    %ecx,0xc(%rsp)
  mov    %dx,0xa(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rdi
  mov    $0x18,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  mov    D73(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x34(%rsp)
  mov    D50(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x30(%rsp)
  mov    %r14,%rdi
  call   <Slock_object@plt>
  test   %r13,%r13
  je     L180
  mov    %r13,%rdi
  call   <Slock_object@plt>
  mov    $0x0,%eax
  call   <Sdeactivate_thread@plt>
  lea    0x18(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <getaddrinfo@plt>
  test   %rax,%rax
  jne    L48
  mov    0x18(%rsp),%r15
  test   %r15,%r15
  je     L258
L205:
  mov    $0x0,%edx
  mov    D50(%rip),%rax
  mov    (%rax),%esi
  mov    D73(%rip),%rax
  mov    (%rax),%edi
  call   <socket@plt>
  mov    %eax,%ebp
  cmp    $0xffffffff,%eax
  je     L71
  mov    D101(%rip),%rax
  mov    (%rax),%esi
  mov    %ebp,%edi
  mov    $0x0,%eax
  call   <fcntl@plt>
  mov    D35(%rip),%rdx
  or     (%rdx),%eax
  mov    %eax,%edx
  mov    D13(%rip),%rax
  mov    (%rax),%esi
  mov    %ebp,%edi
  mov    $0x0,%eax
  call   <fcntl@plt>
  cmpl   $0x0,0xc(%rsp)
  je     L117
L77:
  mov    (%r15),%r12
  cmpw   $0x0,0xa(%rsp)
  jne    L51
L63:
  mov    $0x4,%edx
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <connect@plt>
  cmp    $0xffffffff,%eax
  jne    L147
  mov    D106(%rip),%rax
  mov    (%rax),%ebx
  mov    D174(%rip),%rax
  cmp    (%rax),%ebx
  je     L63
  mov    D178(%rip),%rax
  cmp    (%rax),%ebx
  jne    L60
L123:
  mov    $0x0,%eax
  call   <Sactivate_thread@plt>
  mov    %r14,%rdi
  call   <Sunlock_object@plt>
  test   %r13,%r13
  je     L6
  mov    %r13,%rdi
  call   <Sunlock_object@plt>
  mov    0x18(%rsp),%rdi
  call   <freeaddrinfo@plt>
  jmp    L31
L71:
  mov    D106(%rip),%rax
  mov    (%rax),%ebx
  mov    $0xfffffffe,%ebp
L24:
  mov    $0x0,%eax
  call   <Sactivate_thread@plt>
  mov    %r14,%rdi
  call   <Sunlock_object@plt>
  test   %r13,%r13
  je     L5
  mov    %r13,%rdi
  call   <Sunlock_object@plt>
  mov    0x18(%rsp),%rdi
  call   <freeaddrinfo@plt>
  jmp    L31
L117:
  mov    %ebp,%edi
  call   <ss_set_fd_non_blocking@plt>
  test   %eax,%eax
  jne    L77
  mov    D106(%rip),%rax
  mov    (%rax),%ebx
  mov    %ebp,%edi
  call   <close@plt>
  mov    $0xfffffffe,%ebp
  jmp    L24
L51:
  movzwl 0xa(%rsp),%edi
  call   <htons@plt>
  mov    %eax,(%r12)
  jmp    L63
L60:
  mov    %ebp,%edi
  call   <close@plt>
  mov    0x8(%r15),%r15
  test   %r15,%r15
  jne    L205
  mov    $0xfffffffd,%ebp
  jmp    L24
L6:
  mov    0x18(%rsp),%rdi
  call   <freeaddrinfo@plt>
L31:
  mov    D106(%rip),%rax
  mov    %ebx,(%rax)
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L142
  mov    %ebp,%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  mov    0x18(%rsp),%rdi
  call   <freeaddrinfo@plt>
  jmp    L31
L147:
  mov    D106(%rip),%rax
  mov    (%rax),%ebx
  jmp    L123
L48:
  mov    D106(%rip),%rax
  mov    (%rax),%ebx
  mov    $0x0,%eax
  call   <Sactivate_thread@plt>
  mov    %r14,%rdi
  call   <Sunlock_object@plt>
L76:
  mov    %r13,%rdi
  call   <Sunlock_object@plt>
L116:
  mov    $0xffffffff,%ebp
  jmp    L31
L80:
  mov    D106(%rip),%rax
  mov    (%rax),%ebx
  mov    $0x0,%eax
  call   <Sactivate_thread@plt>
  mov    %r14,%rdi
  call   <Sunlock_object@plt>
  jmp    L116
L180:
  mov    $0x0,%eax
  call   <Sdeactivate_thread@plt>
  lea    0x18(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0x0,%esi
  mov    %r14,%rdi
  call   <getaddrinfo@plt>
  test   %rax,%rax
  jne    L80
  mov    0x18(%rsp),%r15
  test   %r15,%r15
  jne    L205
  mov    D106(%rip),%rax
  mov    (%rax),%ebx
  mov    $0x0,%eax
  call   <Sactivate_thread@plt>
  mov    %r14,%rdi
  call   <Sunlock_object@plt>
  jmp    L116
L258:
  mov    D106(%rip),%rax
  mov    (%rax),%ebx
  mov    $0x0,%eax
  call   <Sactivate_thread@plt>
  mov    %r14,%rdi
  call   <Sunlock_object@plt>
  jmp    L76
L142:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ss_connect_to_ipv4_host_impl(const char *address, const char *service, unsigned short port, int blocking) {
  struct addrinfo hints;
  memset(&hints, 0, sizeof(hints));
  hints.ai_family = AF_INET;
  hints.ai_socktype = SOCK_STREAM;
  Slock_object((void *)address);
  if (service)
    Slock_object((void *)service);
  Sdeactivate_thread();
  struct addrinfo *info;
  int saved_errno = 0;
  if (getaddrinfo(address, service, &hints, &info) || info == NULL) {
    saved_errno = errno;
    Sactivate_thread();
    Sunlock_object((void *)address);
    if (service)
      Sunlock_object((void *)service);
    errno = saved_errno;
    return -1;
  }
  int sock;
  struct addrinfo *tmp;
  int err = 0;
  for (tmp = info; tmp != NULL; tmp = tmp->ai_next) {
    err = 0;
    sock = socket(AF_INET, SOCK_STREAM, 0);
    if (sock == -1) {
      saved_errno = errno;
      err = -2;
      break;
    }
    fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC);
    if (!blocking && !(ss_set_fd_non_blocking(sock))) {
      saved_errno = errno;
      close(sock);
      err = -2;
      break;
    }
    struct sockaddr *in = tmp->ai_addr;
    if (port > 0)
      ((struct sockaddr_in *)in)->sin_port = htons(port);
    int res;
    do {
      res = connect(sock, in, sizeof(struct sockaddr_in));
    } while (res == -1 && errno == EINTR);
    saved_errno = errno;
    if (res == -1 && errno != EINPROGRESS) {
      close(sock);
      err = -3;
      continue;
    } else
      break;
  }
  Sactivate_thread();
  Sunlock_object((void *)address);
  if (service)
    Sunlock_object((void *)service);
  freeaddrinfo(info);
  errno = saved_errno;
  if (err)
    return err;
  return sock;
}
```