user: 请从给定的汇编指令推导出C源代码:

```asm
<szl_socket_new_server>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,-0x7c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x54(%rbp)
  mov    D25(%rip),%rax
  mov    (%rax),%edx
  mov    D59(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  mov    %eax,-0x40(%rbp)
  mov    D40(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x7c(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x18(%rbp)
  lea    -0x48(%rbp),%rcx
  lea    -0x40(%rbp),%rdx
  mov    -0x78(%rbp),%rsi
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <getaddrinfo@plt>
  test   %rax,%rax
  je     L46
  mov    $0xffffffff,%eax
  jmp    L8
L46:
  mov    -0x48(%rbp),%rax
  mov    0x18(%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    0x4(%rax),%ecx
  mov    -0x48(%rbp),%rax
  mov    0x20(%rax),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <socket@plt>
  mov    %eax,-0x50(%rbp)
  cmpl   $0x0,-0x50(%rbp)
  jns    L40
  mov    D34(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <freeaddrinfo@plt>
  mov    -0x4c(%rbp),%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <szl_set_last_strerror@plt>
  mov    $0xffffffff,%eax
  jmp    L8
L40:
  mov    D58(%rip),%rax
  mov    (%rax),%edx
  mov    D62(%rip),%rax
  mov    (%rax),%esi
  lea    -0x54(%rbp),%rcx
  mov    -0x50(%rbp),%eax
  mov    $0x4,%r8d
  mov    %eax,%edi
  call   <setsockopt@plt>
  test   %rax,%rax
  jns    L19
  mov    D34(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <freeaddrinfo@plt>
  mov    -0x4c(%rbp),%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <szl_set_last_strerror@plt>
  mov    $0xffffffff,%eax
  jmp    L8
L19:
  mov    -0x48(%rbp),%rax
  mov    0x8(%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    0x10(%rax),%rcx
  mov    -0x50(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <bind@plt>
  test   %rax,%rax
  jns    L30
  mov    D34(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <freeaddrinfo@plt>
  mov    -0x4c(%rbp),%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <szl_set_last_strerror@plt>
  mov    $0xffffffff,%eax
  jmp    L8
L30:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <freeaddrinfo@plt>
  mov    -0x50(%rbp),%eax
L8:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L14
  call   <__stack_chk_fail@plt>
L14:
  leave
  ret
```

assistant: ```c
int szl_socket_new_server(struct szl_interp *interp, const char *host, const char *service, const int type) {
  struct addrinfo hints, *res;
  int fd, one = 1, err;
  hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
  hints.ai_family = AF_UNSPEC;
  hints.ai_socktype = type;
  hints.ai_protocol = 0;
  hints.ai_addrlen = 0;
  hints.ai_addr = NULL;
  hints.ai_canonname = NULL;
  hints.ai_next = NULL;
  if (getaddrinfo(host, service, &hints, &res) != 0)
    return -1;
  fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
  if (fd < 0) {
    err = errno;
    freeaddrinfo(res);
    szl_set_last_strerror(interp, err);
    return -1;
  }
  if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) {
    err = errno;
    close(fd);
    freeaddrinfo(res);
    szl_set_last_strerror(interp, err);
    return -1;
  }
  if (bind(fd, res->ai_addr, res->ai_addrlen) < 0) {
    err = errno;
    close(fd);
    freeaddrinfo(res);
    szl_set_last_strerror(interp, err);
    return -1;
  }
  freeaddrinfo(res);
  return fd;
}
```