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

```asm
<_nss_myhostname_gethostbyname3_r>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x50(%rbp)
  mov    %esi,%ebx
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9,-0x48(%rbp)
  mov    0x10(%rbp),%r14
  mov    0x18(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  mov    0x20(%rbp),%r15
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    D45(%rip),%rax
  mov    (%rax),%r12d
  lea    0x1(%r12),%edx
  movslq %edx,%rax
  add    $0xf,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L26:
  cmp    %rcx,%rsp
  je     L23
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L26
L23:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L105
  orq    $0x0,-0x8(%rsp,%rax,1)
L105:
  mov    %rsp,%r13
  mov    D18(%rip),%rax
  cmp    %ebx,(%rax)
  je     L36
  mov    D62(%rip),%rax
  cmp    %ebx,(%rax)
  je     L67
  mov    D47(%rip),%rax
  cmp    %ebx,(%rax)
  je     L67
  mov    D118(%rip),%rax
  mov    (%rax),%eax
  mov    -0x48(%rbp),%rbx
  mov    %eax,(%rbx)
  mov    D34(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,(%r14)
  mov    D4(%rip),%rax
  mov    (%rax),%eax
L71:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L110
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L36:
  mov    D62(%rip),%rax
  mov    (%rax),%ebx
L67:
  mov    $0x0,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <gethostname@plt>
  test   %rax,%rax
  js     L106
  mov    %r13,%rsi
  mov    -0x50(%rbp),%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L96
  mov    D52(%rip),%rax
  mov    (%rax),%eax
  mov    -0x48(%rbp),%rbx
  mov    %eax,(%rbx)
  mov    D120(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,(%r14)
  mov    D137(%rip),%rax
  mov    (%rax),%eax
  jmp    L71
L106:
  mov    D99(%rip),%rax
  mov    (%rax),%eax
  mov    -0x48(%rbp),%rbx
  mov    %eax,(%rbx)
  mov    D97(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,(%r14)
  mov    D4(%rip),%rax
  mov    (%rax),%eax
  jmp    L71
L96:
  sub    $0x8,%rsp
  push   %r15
  push   -0x70(%rbp)
  push   %r14
  mov    -0x48(%rbp),%r9
  mov    -0x68(%rbp),%r8
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <fill_in_hostent@plt>
  add    $0x20,%rsp
  jmp    L71
L110:
  call   <__stack_chk_fail@plt>
```

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);
}
```