user: What is the c source code of the assembly code below:

```asm
<res_nmkquery>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x118,%rsp
  mov    %rdi,-0xf8(%rbp)
  mov    %esi,-0xfc(%rbp)
  mov    %rdx,-0x108(%rbp)
  mov    %ecx,-0x100(%rbp)
  mov    %r8d,-0x10c(%rbp)
  mov    %r9,-0x118(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x120(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x128(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x128(%rbp)
  je     L133
  mov    D92(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,0x28(%rbp)
  jge    L205
L133:
  mov    $0xffffffff,%eax
  jmp    L49
L205:
  mov    D92(%rip),%rax
  mov    (%rax),%edx
  mov    -0x128(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x128(%rbp),%r12
L83:
  lea    -0xd8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <__gettimeofday@plt>
  mov    -0xd8(%rbp),%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0xd4(%rbp),%eax
  xor    %edx,%eax
  mov    %eax,-0xec(%rbp)
  mov    -0xec(%rbp),%eax
  movzwl %ax,%eax
  test   %eax,%eax
  je     L83
  mov    -0xf8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0xec(%rbp),%eax
  add    %edx,%eax
  movzwl %ax,%edx
  mov    -0xf8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0xf8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,(%r12)
  mov    -0xfc(%rbp),%eax
  mov    %eax,0x4(%r12)
  mov    -0xf8(%rbp),%rax
  mov    0x4(%rax),%edx
  mov    D13(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  mov    %eax,0x8(%r12)
  mov    D54(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x28(%r12)
  mov    D92(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x128(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    D92(%rip),%rax
  mov    (%rax),%eax
  sub    %eax,0x28(%rbp)
  lea    -0xd0(%rbp),%rax
  mov    %rax,-0xe8(%rbp)
  mov    -0xe8(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0xe8(%rbp)
  mov    -0x128(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0xe8(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0xe8(%rbp)
  movq   $0x0,(%rax)
  lea    -0xd0(%rbp),%rax
  add    $0xa0,%rax
  mov    %rax,-0xe0(%rbp)
  cmpl   $0x82,-0xfc(%rbp)
  je     L257
  cmpl   $0x82,-0xfc(%rbp)
  jg     L160
  cmpl   $0x80,-0xfc(%rbp)
  je     L121
  cmpl   $0x81,-0xfc(%rbp)
  jne    L160
  cmpq   $0x0,-0x118(%rbp)
  je     L87
  mov    D94(%rip),%rax
  mov    (%rax),%edx
  jmp    L66
L87:
  mov    $0x0,%edx
L66:
  mov    D76(%rip),%rax
  mov    (%rax),%eax
  add    %edx,%eax
  sub    %eax,0x28(%rbp)
  cmpl   $0x0,0x28(%rbp)
  jns    L155
  mov    $0xffffffff,%eax
  jmp    L49
L121:
  mov    D76(%rip),%rax
  mov    (%rax),%eax
  sub    %eax,0x28(%rbp)
  cmpl   $0x0,0x28(%rbp)
  jns    L152
  mov    $0xffffffff,%eax
  jmp    L49
L155:
  nop
  jmp    L194
L152:
  nop
L194:
  mov    -0xe0(%rbp),%rsi
  lea    -0xd0(%rbp),%rcx
  mov    0x28(%rbp),%edx
  mov    -0x108(%rbp),%rax
  mov    %rsi,%r8
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <dn_comp@plt>
  mov    %eax,%r13d
  test   %r13d,%r13d
  jns    L5
  mov    $0xffffffff,%eax
  jmp    L49
L5:
  movslq %r13d,%rax
  shl    $0x2,%rax
  add    %rax,%rbx
  sub    %r13d,0x28(%rbp)
  mov    -0x10c(%rbp),%eax
  mov    %rbx,%rsi
  mov    %eax,%edi
  call   <NS_PUT16@plt>
  mov    -0x100(%rbp),%eax
  mov    %rbx,%rsi
  mov    %eax,%edi
  call   <NS_PUT16@plt>
  mov    $0x1,%edi
  call   <htons@plt>
  mov    %rax,0x20(%r12)
  cmpl   $0x80,-0xfc(%rbp)
  je     L67
  cmpq   $0x0,-0x118(%rbp)
  je     L67
  mov    -0xe0(%rbp),%rsi
  lea    -0xd0(%rbp),%rcx
  mov    0x28(%rbp),%edx
  mov    -0x118(%rbp),%rax
  mov    %rsi,%r8
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <dn_comp@plt>
  mov    %eax,%r13d
  mov    %r13d,%eax
  shr    $0x1f,%eax
  movzbl %al,%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <__builtin_expect@plt>
  test   %eax,%eax
  je     L209
  mov    $0xffffffff,%eax
  jmp    L49
L209:
  movslq %r13d,%rax
  shl    $0x2,%rax
  add    %rax,%rbx
  sub    %r13d,0x28(%rbp)
  mov    D79(%rip),%rax
  mov    (%rax),%eax
  mov    %rbx,%rsi
  mov    %eax,%edi
  call   <NS_PUT16@plt>
  mov    -0x100(%rbp),%eax
  mov    %rbx,%rsi
  mov    %eax,%edi
  call   <NS_PUT16@plt>
  mov    %rbx,%rsi
  mov    $0x0,%edi
  call   <NS_PUT32@plt>
  mov    %rbx,%rsi
  mov    $0x0,%edi
  call   <NS_PUT16@plt>
  mov    $0x1,%edi
  call   <htons@plt>
  mov    %rax,0x18(%r12)
  jmp    L67
L257:
  mov    D94(%rip),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    0x10(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,0x28(%rbp)
  setl   %al
  movzbl %al,%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <__builtin_expect@plt>
  test   %eax,%eax
  je     L215
  mov    $0xffffffff,%eax
  jmp    L49
L215:
  mov    %rbx,%rax
  lea    0x4(%rax),%rbx
  movl   $0x0,(%rax)
  mov    -0x10c(%rbp),%eax
  mov    %rbx,%rsi
  mov    %eax,%edi
  call   <NS_PUT16@plt>
  mov    -0x100(%rbp),%eax
  mov    %rbx,%rsi
  mov    %eax,%edi
  call   <NS_PUT16@plt>
  mov    %rbx,%rsi
  mov    $0x0,%edi
  call   <NS_PUT32@plt>
  mov    %rbx,%rsi
  mov    0x10(%rbp),%edi
  call   <NS_PUT16@plt>
  cmpl   $0x0,0x10(%rbp)
  je     L265
  mov    -0x118(%rbp),%rax
  mov    0x10(%rbp),%edx
  mov    %rax,%rsi
  mov    %rbx,%rdi
  call   <memcpy@plt>
  mov    0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rbx
L265:
  mov    $0x1,%edi
  call   <htons@plt>
  mov    %rax,0x10(%r12)
  jmp    L67
L160:
  mov    $0xffffffff,%eax
  jmp    L49
L67:
  mov    %rbx,%rax
  sub    -0x128(%rbp),%rax
  sar    $0x2,%rax
L49:
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L100
  call   <__stack_chk_fail@plt>
L100:
  add    $0x118,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
int res_nmkquery(res_state statp, int op, const char *dname, int class, int type, const u_char *data, int datalen, const u_char *newrr_in, u_char *buf, int buflen) {
  register HEADER *hp;
  register u_char *cp;
  register int n;
  u_char *dnptrs[20], **dpp, **lastdnptr;
  if ((buf == NULL) || (buflen < HFIXEDSZ))
    return (-1);
  memset(buf, 0, HFIXEDSZ);
  hp = (HEADER *)buf;
  int randombits;
  do {
    struct timeval tv;
    __gettimeofday(&tv, NULL);
    randombits = (tv.tv_sec << 8) ^ tv.tv_usec;
  } while ((randombits & 0xffff) == 0);
  statp->id = (statp->id + randombits) & 0xffff;
  hp->id = statp->id;
  hp->opcode = op;
  hp->rd = (statp->options & RES_RECURSE) != 0;
  hp->rcode = NOERROR;
  cp = buf + HFIXEDSZ;
  buflen -= HFIXEDSZ;
  dpp = dnptrs;
  *dpp++ = buf;
  *dpp++ = NULL;
  lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
  switch (op) {
  case NS_NOTIFY_OP:
    if ((buflen -= QFIXEDSZ + (data == NULL ? 0 : RRFIXEDSZ)) < 0)
      return (-1);
    goto compose;
  case QUERY:
    if ((buflen -= QFIXEDSZ) < 0)
      return (-1);
  compose:
    if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
      return (-1);
    cp += n;
    buflen -= n;
    NS_PUT16(type, cp);
    NS_PUT16(class, cp);
    hp->qdcount = htons(1);
    if (op == QUERY || data == NULL)
      break;
    n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr);
    if (__builtin_expect(n < 0, 0))
      return (-1);
    cp += n;
    buflen -= n;
    NS_PUT16(T_NULL, cp);
    NS_PUT16(class, cp);
    NS_PUT32(0, cp);
    NS_PUT16(0, cp);
    hp->arcount = htons(1);
    break;
  case IQUERY:
    if (__builtin_expect(buflen < 1 + RRFIXEDSZ + datalen, 0))
      return (-1);
    *cp++ = '\0';
    NS_PUT16(type, cp);
    NS_PUT16(class, cp);
    NS_PUT32(0, cp);
    NS_PUT16(datalen, cp);
    if (datalen) {
      memcpy(cp, data, datalen);
      cp += datalen;
    }
    hp->ancount = htons(1);
    break;
  default:
    return (-1);
  }
  return (cp - buf);
}
```