user: 这段汇编代码用C语言表示是什么样的:

```asm
<ss_listen_on_ipv4_socket_impl>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  mov    $0xc,%edx
  push   %rbx
  mov    %esi,%ebx
  xor    %esi,%esi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r13
  mov    %r13,%rdi
  call   <memset@plt>
  mov    D81(%rip),%r14
  mov    (%r14),%edi
  mov    %edi,0x14(%rsp)
  test   %r12,%r12
  je     L60
  lea    0x10(%rsp),%rdx
  mov    %r12,%rsi
  call   <inet_pton@plt>
  cmp    $0x1,%eax
  jne    L24
L6:
  mov    D44(%rip),%rax
  mov    (%r14),%edi
  xor    %edx,%edx
  mov    (%rax),%esi
  call   <socket@plt>
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  je     L3
  mov    D89(%rip),%rax
  mov    %r12d,%edi
  mov    (%rax),%esi
  xor    %eax,%eax
  call   <fcntl@plt>
  mov    D0(%rip),%rdx
  mov    %r12d,%edi
  or     (%rdx),%eax
  mov    %eax,%edx
  mov    D21(%rip),%rax
  mov    (%rax),%esi
  xor    %eax,%eax
  call   <fcntl@plt>
  mov    D82(%rip),%rax
  lea    0x8(%rsp),%rcx
  mov    %r12d,%edi
  mov    $0x4,%r8d
  movl   $0x1,0x8(%rsp)
  mov    (%rax),%edx
  mov    D30(%rip),%rax
  mov    (%rax),%esi
  call   <setsockopt@plt>
  movzwl %bx,%edi
  call   <htons@plt>
  mov    $0xc,%edx
  mov    %r13,%rsi
  mov    %r12d,%edi
  mov    %eax,0xc(%rsp)
  call   <bind@plt>
  cmp    $0xffffffff,%eax
  je     L75
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <listen@plt>
  cmp    $0xffffffff,%eax
  je     L88
L28:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L95
  add    $0x20,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L60:
  mov    D42(%rip),%rax
  mov    (%rax),%edi
  call   <htonl@plt>
  mov    %eax,0x10(%rsp)
  jmp    L6
  nop
L24:
  mov    $0xffffffff,%r12d
  jmp    L28
  nopl   0x0(%rax,%rax,1)
L3:
  mov    $0xfffffffe,%r12d
  jmp    L28
L75:
  mov    D97(%rip),%rbx
  mov    %r12d,%edi
  mov    $0xfffffffd,%r12d
  mov    (%rbx),%ebp
  call   <close@plt>
  mov    %ebp,(%rbx)
  jmp    L28
L88:
  mov    D97(%rip),%rbx
  mov    %r12d,%edi
  mov    $0xfffffffc,%r12d
  mov    (%rbx),%ebp
  call   <close@plt>
  mov    %ebp,(%rbx)
  jmp    L28
L95:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ss_listen_on_ipv4_socket_impl(const char *address, unsigned short port, int backlog) {
  struct sockaddr_in addr;
  memset(&addr, 0, sizeof(addr));
  addr.sin_family = AF_INET;
  if (address) {
    if (!(inet_pton(AF_INET, address, &(addr.sin_addr)) == 1))
      return -1;
  } else
    addr.sin_addr.s_addr = htonl(INADDR_ANY);
  int sock = socket(AF_INET, SOCK_STREAM, 0);
  if (sock == -1)
    return -2;
  fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC);
  int optval = 1;
  setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval));
  addr.sin_port = htons(port);
  if ((bind(sock, (struct sockaddr *)&addr, sizeof(addr))) == -1) {
    int saved_errno = errno;
    close(sock);
    errno = saved_errno;
    return -3;
  }
  if ((listen(sock, backlog)) == -1) {
    int saved_errno = errno;
    close(sock);
    errno = saved_errno;
    return -4;
  }
  return sock;
}
```