user: Demonstrate the C code that generates the assembly output below:

```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     L51
  mov    %r15,%rdi
  call   <Slock_object@plt>
L51:
  xor    %eax,%eax
  lea    0x14(%rsp),%r14
  call   <Sdeactivate_thread@plt>
  mov    D59(%rip),%rbx
  nopl   0x0(%rax,%rax,1)
L29:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %ebp,%edi
  call   <accept@plt>
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  je     L57
  mov    D8(%rip),%rax
  mov    %r12d,%edi
  mov    (%rax),%esi
  xor    %eax,%eax
  call   <fcntl@plt>
  mov    D62(%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    (%rbx),%edx
L114:
  xor    %eax,%eax
  mov    %edx,0xc(%rsp)
  call   <Sactivate_thread@plt>
  test   %r15,%r15
  mov    0xc(%rsp),%edx
  je     L52
  mov    %r15,%rdi
  call   <Sunlock_object@plt>
  mov    0xc(%rsp),%edx
L52:
  cmpl   $0x4,0x14(%rsp)
  ja     L35
  cmp    $0xffffffff,%r12d
  je     L123
  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    L68
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L57:
  mov    D64(%rip),%rax
  mov    (%rbx),%edx
  cmp    (%rax),%edx
  je     L29
  jmp    L114
  nopl   0x0(%rax,%rax,1)
L123:
  mov    D3(%rip),%rax
  mov    %edx,(%rbx)
  cmp    %edx,(%rax)
  je     L121
  mov    D32(%rip),%rax
  cmp    %edx,(%rax)
  mov    $0xfffffffe,%eax
  cmove  %eax,%r12d
  jmp    L118
L35:
  mov    %r12d,%edi
  mov    %edx,0xc(%rsp)
  mov    $0xffffffff,%r12d
  call   <close@plt>
  mov    0xc(%rsp),%edx
  mov    %edx,(%rbx)
  jmp    L118
L121:
  mov    $0xfffffffe,%r12d
  jmp    L118
L68:
  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;
}
```