user: Translate the below assembly code into C programming language:

```asm
<ss_connect_to_unix_host_impl>:
  endbr64
  push   %r14
  mov    $0x8,%edx
  mov    %esi,%r14d
  xor    %esi,%esi
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    $0x3,%eax
  ja     L13
  mov    D105(%rip),%rbx
  mov    (%rsp),%edi
  mov    %rbp,%rsi
  mov    (%rbx),%eax
  mov    %eax,0x4(%rsp)
  call   <strcpy@plt>
  xor    %eax,%eax
  call   <Sdeactivate_thread@plt>
  mov    D96(%rip),%rax
  mov    (%rbx),%edi
  xor    %edx,%edx
  mov    (%rax),%esi
  call   <socket@plt>
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  jne    L50
  mov    D87(%rip),%rbp
  xor    %eax,%eax
  mov    $0xfffffffe,%r12d
  mov    0x0(%rbp),%ebx
  call   <Sactivate_thread@plt>
L137:
  mov    %ebx,0x0(%rbp)
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L69
  add    $0x10,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L50:
  mov    D35(%rip),%rax
  mov    %r12d,%edi
  mov    (%rax),%esi
  xor    %eax,%eax
  call   <fcntl@plt>
  mov    D64(%rip),%rdx
  mov    %r12d,%edi
  or     (%rdx),%eax
  mov    %eax,%edx
  mov    D61(%rip),%rax
  mov    (%rax),%esi
  xor    %eax,%eax
  call   <fcntl@plt>
  mov    D87(%rip),%rbp
  test   %r14d,%r14d
  jne    L46
  jmp    L22
  nop
L64:
  mov    D41(%rip),%rax
  cmp    (%rax),%ebx
  jne    L63
L46:
  mov    $0x8,%edx
  mov    %r13,%rsi
  mov    %r12d,%edi
  call   <connect@plt>
  mov    0x0(%rbp),%ebx
  cmp    $0xffffffff,%eax
  je     L64
L100:
  xor    %eax,%eax
  call   <Sactivate_thread@plt>
  jmp    L137
  nop
L22:
  mov    %r12d,%edi
  call   <ss_set_fd_non_blocking@plt>
  test   %eax,%eax
  jne    L46
  mov    %r12d,%edi
  mov    0x0(%rbp),%ebx
  mov    $0xfffffffe,%r12d
  call   <close@plt>
  xor    %eax,%eax
  call   <Sactivate_thread@plt>
  jmp    L137
  nopl   0x0(%rax)
L63:
  mov    D57(%rip),%rax
  cmp    (%rax),%ebx
  je     L100
  mov    D4(%rip),%rax
  cmp    (%rax),%ebx
  je     L100
  mov    %r12d,%edi
  mov    $0xfffffffd,%r12d
  call   <close@plt>
  xor    %eax,%eax
  call   <Sactivate_thread@plt>
  jmp    L137
L13:
  mov    D87(%rip),%rbp
  xor    %ebx,%ebx
  mov    $0xffffffff,%r12d
  jmp    L137
L69:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ss_connect_to_unix_host_impl(const char *pathname, int blocking) {
  struct sockaddr_un addr;
  memset(&addr, 0, sizeof(addr));
  if (strlen(pathname) >= sizeof(addr.sun_path)) {
    errno = 0;
    return -1;
  }
  addr.sun_family = AF_UNIX;
  strcpy(addr.sun_path, pathname);
  Sdeactivate_thread();
  int saved_errno = 0;
  int err = 0;
  int sock = socket(AF_UNIX, SOCK_STREAM, 0);
  if (sock == -1) {
    saved_errno = errno;
    err = -2;
  } else {
    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;
    }
  }
  if (!err) {
    int res;
    do {
      res = connect(sock, (struct sockaddr *)&addr, sizeof(struct sockaddr_un));
    } while (res == -1 && errno == EINTR);
    saved_errno = errno;
    if (res == -1 && errno != EINPROGRESS && errno != EAGAIN) {
      close(sock);
      err = -3;
    }
  }
  Sactivate_thread();
  errno = saved_errno;
  if (err)
    return err;
  return sock;
}
```