user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<grok_question>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  mov    -0x28(%rbp),%rcx
  lea    -0x20(%rbp),%rdx
  mov    -0x1c(%rbp),%esi
  mov    -0x18(%rbp),%rax
  mov    $0x200,%r8d
  mov    %rax,%rdi
  call   <rfc1035NameUnpack@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  je     L71
  mov    $0x0,%eax
  jmp    L32
L71:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L36
  mov    -0x28(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L36
L29:
  mov    -0x8(%rbp),%rax
  movb   $0x20,(%rax)
L36:
  mov    -0x28(%rbp),%rax
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L29
  jmp    L14
L11:
  mov    -0x8(%rbp),%rax
  movb   $0x20,(%rax)
L14:
  mov    -0x28(%rbp),%rax
  mov    $0xd,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L11
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L60
L52:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    -0x8(%rbp),%rdx
  mov    %al,(%rdx)
  addq   $0x1,-0x8(%rbp)
L60:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L52
  mov    -0x20(%rbp),%eax
  add    $0x3,%eax
  cmp    %eax,-0x1c(%rbp)
  jg     L91
  mov    $0x0,%eax
  jmp    L32
L91:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  or     %ecx,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %dx,(%rax)
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x3,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  or     %ecx,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %dx,(%rax)
  mov    -0x20(%rbp),%eax
  add    $0x4,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
L32:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D6
type_infered: string

tool: D6: .

assistant: ```c
off_t grok_question(const u_char *buf, int len, off_t offset, char *qname, unsigned short *qtype, unsigned short *qclass) {
  char *t;
  int x;
  x = rfc1035NameUnpack(buf, len, &offset, qname, 512);
  if (0 != x)
    return 0;
  if ('\0' == *qname)
    strcpy(qname, ".");
  while ((t = strchr(qname, '\n')))
    *t = ' ';
  while ((t = strchr(qname, '\r')))
    *t = ' ';
  for (t = qname; *t; t++)
    *t = tolower(*t);
  if (offset + 4 > len)
    return 0;
  *qtype = ((((uint8_t *)(buf + offset))[0] << 8) | ((uint8_t *)(buf + offset))[1]);
  *qclass = ((((uint8_t *)(buf + offset + 2))[0] << 8) | ((uint8_t *)(buf + offset + 2))[1]);
  offset += 4;
  return offset;
}
```