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

```asm
<_nss_myhostname_gethostbyname3_r>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r12
  push   %rbx
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9,-0x70(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x78(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x80(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%r12
  mov    D131(%rip),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ebx
  movslq %ebx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x38(%rbp)
  movslq %ebx,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %ebx,%rax
  mov    %rax,%r10
  mov    $0x0,%r11d
  movslq %ebx,%rax
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L93:
  cmp    %rdx,%rsp
  je     L97
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L93
L97:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L112
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L112:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x30(%rbp)
  mov    D96(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4c(%rbp)
  jne    L18
  mov    D82(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
L18:
  mov    D82(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4c(%rbp)
  je     L109
  mov    D86(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4c(%rbp)
  je     L109
  mov    D97(%rip),%rax
  mov    (%rax),%edx
  mov    -0x70(%rbp),%rax
  mov    %edx,(%rax)
  mov    D52(%rip),%rax
  mov    (%rax),%edx
  mov    -0x78(%rbp),%rax
  mov    %edx,(%rax)
  mov    D126(%rip),%rax
  mov    (%rax),%eax
  jmp    L100
L109:
  mov    -0x30(%rbp),%rax
  mov    %ebx,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    %ebx,%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <gethostname@plt>
  test   %rax,%rax
  jns    L29
  mov    D64(%rip),%rax
  mov    (%rax),%edx
  mov    -0x70(%rbp),%rax
  mov    %edx,(%rax)
  mov    D77(%rip),%rax
  mov    (%rax),%edx
  mov    -0x78(%rbp),%rax
  mov    %edx,(%rax)
  mov    D126(%rip),%rax
  mov    (%rax),%eax
  jmp    L100
L29:
  mov    -0x30(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L87
  mov    D12(%rip),%rax
  mov    (%rax),%edx
  mov    -0x70(%rbp),%rax
  mov    %edx,(%rax)
  mov    D101(%rip),%rax
  mov    (%rax),%edx
  mov    -0x78(%rbp),%rax
  mov    %edx,(%rax)
  mov    D20(%rip),%rax
  mov    (%rax),%eax
  jmp    L100
L87:
  mov    -0x70(%rbp),%r8
  mov    -0x68(%rbp),%rdi
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x4c(%rbp),%esi
  mov    -0x30(%rbp),%rax
  sub    $0x8,%rsp
  push   -0x88(%rbp)
  push   -0x80(%rbp)
  push   -0x78(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <fill_in_hostent@plt>
  add    $0x20,%rsp
L100:
  mov    %r12,%rsp
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L102
  call   <__stack_chk_fail@plt>
L102:
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
enum nss_status _nss_myhostname_gethostbyname3_r(const char *name, int af, struct hostent *host, char *buffer, size_t buflen, int *errnop, int *h_errnop, int32_t *ttlp, char **canonp) {
  char hn[HOST_NAME_MAX + 1];
  if (af == AF_UNSPEC)
    af = AF_INET;
  if (af != AF_INET && af != AF_INET6) {
    *errnop = EAFNOSUPPORT;
    *h_errnop = NO_DATA;
    return NSS_STATUS_UNAVAIL;
  }
  memset(hn, 0, sizeof(hn));
  if (gethostname(hn, sizeof(hn) - 1) < 0) {
    *errnop = errno;
    *h_errnop = NO_RECOVERY;
    return NSS_STATUS_UNAVAIL;
  }
  if (strcasecmp(name, hn) != 0) {
    *errnop = ENOENT;
    *h_errnop = HOST_NOT_FOUND;
    return NSS_STATUS_NOTFOUND;
  }
  return fill_in_hostent(hn, af, host, buffer, buflen, errnop, h_errnop, ttlp, canonp);
}
```