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

```asm
<ns_initparse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  mov    $0x40,%edx
  mov    $0x5e,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x28(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,0x38(%rax)
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,0x30(%rax)
  mov    D72(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x8(%rbp)
  jb     L82
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <NS_GET16@plt>
  mov    D72(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x8(%rbp)
  jb     L123
  mov    -0x28(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <NS_GET16@plt>
  movl   $0x0,-0x10(%rbp)
  jmp    L100
L74:
  mov    D72(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x8(%rbp)
  jb     L50
  mov    -0x28(%rbp),%rax
  mov    0x10(%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <NS_GET16@plt>
  addl   $0x1,-0x10(%rbp)
L100:
  mov    D74(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L74
  movl   $0x0,-0x10(%rbp)
  jmp    L96
L144:
  mov    -0x28(%rbp),%rax
  mov    0x10(%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L21
  mov    -0x28(%rbp),%rax
  mov    0x28(%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  jmp    L145
L21:
  mov    -0x28(%rbp),%rax
  mov    0x10(%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x10(%rbp),%edx
  mov    -0x8(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <skiprr@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jns    L15
  mov    $0xffffffff,%eax
  jmp    L85
L15:
  mov    -0x28(%rbp),%rax
  mov    0x28(%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x18(%rbp)
L145:
  addl   $0x1,-0x10(%rbp)
L96:
  mov    D74(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L144
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jne    L141
  mov    D74(%rip),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,0x18(%rax)
  mov    -0x28(%rbp),%rax
  movl   $0xffffffff,0x1c(%rax)
  mov    -0x28(%rbp),%rax
  movq   $0x0,0x20(%rax)
  mov    $0x0,%eax
  jmp    L85
L82:
  nop
  jmp    L107
L123:
  nop
  jmp    L107
L50:
  nop
  jmp    L107
L141:
  nop
L107:
  mov    D9(%rip),%rax
  mov    (%rax),%edx
  mov    D33(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
L85:
  leave
  ret
```

assistant: ```c
int ns_initparse(const u_char *msg, int msglen, ns_msg *handle) {
  const u_char *eom = msg + msglen;
  int i;
  memset(handle, 0x5e, sizeof *handle);
  handle->_msg = msg;
  handle->_eom = eom;
  if (msg + NS_INT16SZ > eom)
    goto emsgsize;
  NS_GET16(handle->_id, msg);
  if (msg + NS_INT16SZ > eom)
    goto emsgsize;
  NS_GET16(handle->_flags, msg);
  for (i = 0; i < ns_s_max; i++) {
    if (msg + NS_INT16SZ > eom)
      goto emsgsize;
    NS_GET16(handle->_counts[i], msg);
  }
  for (i = 0; i < ns_s_max; i++)
    if (handle->_counts[i] == 0)
      handle->_sections[i] = NULL;
    else {
      int b = skiprr(msg, eom, (ns_sect)i, handle->_counts[i]);
      if (b < 0)
        return (-1);
      handle->_sections[i] = msg;
      msg += b;
    }
  if (msg != eom)
    goto emsgsize;
  handle->_sect = ns_s_max;
  handle->_rrnum = -1;
  handle->_msg_ptr = NULL;
  return (0);
emsgsize:
  errno = EMSGSIZE;
  return (-1);
}
```