user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<ss_accept_ipv6_connection_impl>:
  endbr64
  push   %r15
  mov    $0x4,%edx
  mov    %rsi,%r15
  xor    %esi,%esi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r13
  mov    %r13,%rdi
  call   <memset@plt>
  movl   $0x4,0x14(%rsp)
  test   %r15,%r15
  je     L111
  mov    %r15,%rdi
  call   <Slock_object@plt>
L111:
  xor    %eax,%eax
  lea    0x14(%rsp),%r14
  call   <Sdeactivate_thread@plt>
  mov    D45(%rip),%rbx
  nopl   0x0(%rax,%rax,1)
L69:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %ebp,%edi
  call   <accept@plt>
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  je     L30
  mov    D42(%rip),%rax
  mov    %r12d,%edi
  mov    (%rax),%esi
  xor    %eax,%eax
  call   <fcntl@plt>
  mov    D11(%rip),%rdx
  mov    %r12d,%edi
  or     (%rdx),%eax
  mov    %eax,%edx
  mov    D28(%rip),%rax
  mov    (%rax),%esi
  xor    %eax,%eax
  call   <fcntl@plt>
  mov    (%rbx),%edx
L108:
  xor    %eax,%eax
  mov    %edx,0xc(%rsp)
  call   <Sactivate_thread@plt>
  test   %r15,%r15
  mov    0xc(%rsp),%edx
  je     L98
  mov    %r15,%rdi
  call   <Sunlock_object@plt>
  mov    0xc(%rsp),%edx
L98:
  cmpl   $0x4,0x14(%rsp)
  ja     L45
  cmp    $0xffffffff,%r12d
  je     L26
  test   %r15,%r15
  je     L118
  mov    $0x4,%edx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <memcpy@plt>
L118:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L30:
  mov    D33(%rip),%rax
  mov    (%rbx),%edx
  cmp    (%rax),%edx
  je     L69
  jmp    L108
  nopl   0x0(%rax,%rax,1)
L26:
  mov    D41(%rip),%rax
  mov    %edx,(%rbx)
  cmp    %edx,(%rax)
  je     L4
  mov    D29(%rip),%rax
  cmp    %edx,(%rax)
  mov    $0xfffffffe,%eax
  cmove  %eax,%r12d
  jmp    L118
L45:
  mov    %r12d,%edi
  mov    %edx,0xc(%rsp)
  mov    $0xffffffff,%r12d
  call   <close@plt>
  mov    0xc(%rsp),%edx
  mov    %edx,(%rbx)
  jmp    L118
L4:
  mov    $0xfffffffe,%r12d
  jmp    L118
L13:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ss_accept_ipv6_connection_impl(int sock, uint8_t *connection) {
  struct sockaddr_in6 addr;
  memset(&addr, 0, sizeof(addr));
  socklen_t addr_len = sizeof(addr);
  if (connection)
    Slock_object((void *)connection);
  Sdeactivate_thread();
  int connect_sock;
  do {
    connect_sock = accept(sock, (struct sockaddr *)&addr, &addr_len);
    if (connect_sock != -1) {
      fcntl(connect_sock, F_SETFD, fcntl(connect_sock, F_GETFD) | FD_CLOEXEC);
    }
  } while (connect_sock == -1 && errno == EINTR);
  int saved_errno = errno;
  Sactivate_thread();
  if (connection)
    Sunlock_object((void *)connection);
  if (addr_len > sizeof(addr)) {
    close(connect_sock);
    errno = saved_errno;
    return -1;
  }
  if (connect_sock == -1) {
    errno = saved_errno;
    if (saved_errno == EAGAIN || saved_errno == EWOULDBLOCK)
      return -2;
    return -1;
  }
  if (connection)
    memcpy(connection, &addr.sin6_addr.s6_addr, sizeof(addr.sin6_addr.s6_addr));
  return connect_sock;
}
```