user: Translate the below assembly code into C programming language:

```asm
<ns_initparse>:
  endbr64
  push   %r15
  movslq %esi,%rsi
  mov    %rdx,%r15
  movq   %rdi,%xmm1
  push   %r14
  mov    $0x40,%edx
  push   %r13
  lea    (%rdi,%rsi,4),%r13
  mov    $0x5e,%esi
  push   %r12
  movq   %r13,%xmm0
  push   %rbp
  punpcklqdq %xmm1,%xmm0
  mov    %rdi,%rbp
  mov    %r15,%rdi
  push   %rbx
  sub    $0x18,%rsp
  movaps %xmm0,(%rsp)
  call   <memset@plt>
  mov    D10(%rip),%r14
  movdqa (%rsp),%xmm0
  movslq (%r14),%rax
  movups %xmm0,0x30(%r15)
  lea    0x0(%rbp,%rax,4),%rax
  cmp    %rax,%r13
  jb     L83
  mov    (%r15),%rdi
  mov    %rbp,%rsi
  call   <NS_GET16@plt>
  movslq (%r14),%rax
  lea    0x0(%rbp,%rax,4),%rax
  cmp    %rax,%r13
  jb     L83
  mov    0x8(%r15),%rdi
  mov    %rbp,%rsi
  call   <NS_GET16@plt>
  mov    D27(%rip),%r12
  mov    (%r12),%eax
  test   %eax,%eax
  jle    L76
  xor    %ebx,%ebx
  jmp    L125
  nopl   0x0(%rax)
L119:
  mov    0x10(%r15),%rax
  mov    %rbp,%rsi
  mov    (%rax,%rbx,8),%rdi
  add    $0x1,%rbx
  call   <NS_GET16@plt>
  mov    (%r12),%eax
  cmp    %ebx,%eax
  jle    L110
L125:
  movslq (%r14),%rax
  lea    0x0(%rbp,%rax,4),%rax
  cmp    %rax,%r13
  jae    L119
L83:
  mov    D30(%rip),%rax
  mov    (%rax),%edx
  mov    D37(%rip),%rax
  mov    %edx,(%rax)
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L110:
  test   %eax,%eax
  jle    L76
  xor    %ebx,%ebx
  jmp    L50
  nopl   0x0(%rax,%rax,1)
L45:
  mov    0x28(%r15),%rax
  movq   $0x0,(%rax,%rbx,8)
  mov    (%r12),%eax
  add    $0x1,%rbx
  cmp    %ebx,%eax
  jle    L76
L50:
  mov    0x10(%r15),%rax
  mov    %ebx,%edx
  lea    0x0(,%rbx,8),%r14
  mov    (%rax,%rbx,8),%rcx
  test   %rcx,%rcx
  je     L45
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <skiprr@plt>
  test   %eax,%eax
  js     L128
  mov    0x28(%r15),%rdx
  cltq
  add    $0x1,%rbx
  mov    %rbp,(%rdx,%r14,1)
  lea    0x0(%rbp,%rax,4),%rbp
  mov    (%r12),%eax
  cmp    %ebx,%eax
  jg     L50
L76:
  cmp    %rbp,%r13
  jne    L83
  mov    %eax,0x18(%r15)
  xor    %eax,%eax
  movl   $0xffffffff,0x1c(%r15)
  movq   $0x0,0x20(%r15)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L128:
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  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);
}
```