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

```asm
<ss_connect_to_unix_host_impl>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    $0x8,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    $0x3,%eax
  ja     L109
  mov    D5(%rip),%rbp
  mov    0x0(%rbp),%eax
  mov    %eax,0x4(%rsp)
  mov    %rbx,%rsi
  mov    (%rsp),%edi
  call   <strcpy@plt>
  mov    $0x0,%eax
  call   <Sdeactivate_thread@plt>
  mov    $0x0,%edx
  mov    D38(%rip),%rax
  mov    (%rax),%esi
  mov    0x0(%rbp),%edi
  call   <socket@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  jne    L107
  mov    D32(%rip),%rax
  mov    (%rax),%ebp
  mov    $0xfffffffe,%ebx
L50:
  mov    $0x0,%eax
  call   <Sactivate_thread@plt>
  jmp    L110
L107:
  mov    D1(%rip),%rax
  mov    (%rax),%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <fcntl@plt>
  mov    D83(%rip),%rdx
  or     (%rdx),%eax
  mov    %eax,%edx
  mov    D55(%rip),%rax
  mov    (%rax),%esi
  mov    %ebx,%edi
  mov    $0x0,%eax
  call   <fcntl@plt>
  test   %r12d,%r12d
  je     L52
L105:
  mov    %rsp,%r12
L129:
  mov    $0x8,%edx
  mov    %r12,%rsi
  mov    %ebx,%edi
  call   <connect@plt>
  cmp    $0xffffffff,%eax
  jne    L3
  mov    D32(%rip),%rax
  mov    (%rax),%ebp
  mov    D71(%rip),%rax
  cmp    (%rax),%ebp
  je     L129
  mov    D46(%rip),%rax
  cmp    (%rax),%ebp
  je     L112
  mov    D72(%rip),%rax
  cmp    (%rax),%ebp
  je     L112
  mov    %ebx,%edi
  call   <close@plt>
  mov    $0xfffffffd,%ebx
  jmp    L50
L52:
  mov    %ebx,%edi
  call   <ss_set_fd_non_blocking@plt>
  test   %eax,%eax
  jne    L105
  mov    D32(%rip),%rax
  mov    (%rax),%ebp
  mov    %ebx,%edi
  call   <close@plt>
  mov    $0xfffffffe,%ebx
  jmp    L50
L109:
  mov    $0x0,%ebp
  mov    $0xffffffff,%ebx
  jmp    L110
L3:
  mov    D32(%rip),%rax
  mov    (%rax),%ebp
L112:
  mov    $0x0,%eax
  call   <Sactivate_thread@plt>
L110:
  mov    D32(%rip),%rax
  mov    %ebp,(%rax)
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L73
  mov    %ebx,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L73:
  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;
}
```