user: 请将以下的汇编代码转换成C语言代码：

```asm
<server_setget_info>:
  endbr64
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %rdx,%r13
  xor    %edx,%edx
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    D13(%rip),%rbx
  mov    %edi,0xc(%rsp)
  lea    0x1c(%rsp),%rbp
  mov    (%rbx),%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    D25(%rip),%rax
  mov    (%rax),%esi
  call   <socket@plt>
  mov    %eax,%edi
  mov    %eax,%r12d
  call   <assert@plt>
  xor    %esi,%esi
  mov    $0xc,%edx
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    (%rbx),%eax
  mov    %eax,0x24(%rsp)
  mov    D10(%rip),%rax
  mov    (%rax),%edi
  call   <htonl@plt>
  mov    $0x5000,%edi
  mov    %eax,0x20(%rsp)
  call   <htons@plt>
  mov    $0xc,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  mov    %eax,0x1c(%rsp)
  call   <bind@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  mov    $0x1,%esi
  mov    %r12d,%edi
  call   <listen@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %r12d,%edi
  call   <accept@plt>
  mov    %eax,%ebp
  mov    %eax,%edi
  call   <assert@plt>
  lea    0xc(%rsp),%rsi
  mov    $0x4,%edx
  mov    %ebp,%edi
  call   <write@plt>
  xor    %edi,%edi
  cmp    $0x4,%eax
  sete   %dil
  call   <assert@plt>
  lea    0x10(%rsp),%rsi
  mov    %ebp,%edi
  xor    %eax,%eax
  mov    $0x8,%edx
  call   <read@plt>
  xor    %edi,%edi
  cmp    $0x8,%eax
  sete   %dil
  call   <assert@plt>
  mov    $0x4,%edx
  mov    %r14,%rsi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <read@plt>
  xor    %edi,%edi
  cmp    $0x4,%eax
  sete   %dil
  call   <assert@plt>
  mov    $0x4,%edx
  mov    %r13,%rsi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <read@plt>
  xor    %edi,%edi
  cmp    $0x4,%eax
  sete   %dil
  call   <assert@plt>
  mov    %ebp,%edi
  call   <close@plt>
  mov    %r12d,%edi
  call   <close@plt>
  mov    0x10(%rsp),%rax
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L9
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
size_t server_setget_info(int port, int *num_threads, int *persist_with_reads) {
  struct sockaddr_in serv_addr;
  int lfd = 0, ret = 0, connfd;
  size_t buffer_size;
  int conn_port = 20480;
  lfd = socket(AF_INET, SOCK_STREAM, 0);
  assert(lfd);
  memset(&serv_addr, 0, sizeof(serv_addr));
  serv_addr.sin_family = AF_INET;
  serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
  serv_addr.sin_port = htons(conn_port);
  ret = bind(lfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
  assert(ret == 0);
  ret = listen(lfd, 1);
  assert(ret == 0);
  connfd = accept(lfd, (struct sockaddr *)NULL, NULL);
  assert(connfd);
  ret = write(connfd, &port, sizeof(port));
  assert(ret == sizeof(port));
  ret = read(connfd, &buffer_size, sizeof(buffer_size));
  assert(ret == sizeof(buffer_size));
  ret = read(connfd, num_threads, sizeof(int));
  assert(ret == sizeof(int));
  ret = read(connfd, persist_with_reads, sizeof(int));
  assert(ret == sizeof(int));
  close(connfd);
  close(lfd);
  return buffer_size;
}
```