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

```asm
<__dns_parse>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdx,(%rsp)
  cmp    $0xb,%esi
  jle    L250
  mov    %rdi,%rbp
  testb  $0xf,0x3(%rdi)
  jne    L18
  movzbl 0x4(%rdi),%edx
  mov    %rcx,%r13
  movzbl 0x5(%rdi),%ecx
  lea    0xc(%rdi),%rax
  movzbl 0x6(%rdi),%r8d
  shl    $0x8,%edx
  add    %ecx,%edx
  movzbl 0x7(%rdi),%ecx
  shl    $0x8,%r8d
  add    %ecx,%r8d
  lea    (%rdx,%r8,1),%ecx
  cmp    $0x40,%ecx
  jg     L250
  lea    -0x1(%rdx),%edi
  test   %edx,%edx
  je     L178
  movslq %esi,%r12
  lea    -0x6(%rbp,%r12,1),%r9
  nopl   0x0(%rax)
L101:
  mov    %rax,%rdx
  movzbl (%rax),%ecx
  sub    %rbp,%rdx
  cmp    %r12,%rdx
  jl     L270
  jmp    L5
L49:
  lea    0x1(%rax),%rdx
  mov    %rdx,%rcx
  sub    %rbp,%rcx
  cmp    %r12,%rcx
  jge    L293
  mov    %rdx,%rax
L270:
  movzbl (%rax),%edx
  mov    %edx,%ecx
  sub    $0x1,%edx
  cmp    $0x7e,%edx
  jbe    L49
L5:
  cmp    $0xc1,%cl
  ja     L250
L262:
  je     L142
  cmp    %r9,%rax
  ja     L250
  cmp    $0x1,%cl
  mov    $0x5,%edx
  sbb    $0xffffffffffffffff,%rdx
L87:
  add    %rdx,%rax
  sub    $0x1,%edi
  jae    L101
L178:
  lea    -0x1(%r8),%r15d
  test   %r8d,%r8d
  je     L18
  movslq %esi,%r12
  lea    -0x6(%r12),%rbx
  mov    %rbx,0x8(%rsp)
  nopl   0x0(%rax)
L153:
  mov    %rax,%rdx
  movzbl (%rax),%ecx
  sub    %rbp,%rdx
  cmp    %r12,%rdx
  jl     L41
  jmp    L73
L138:
  lea    0x1(%rax),%rdx
  mov    %rdx,%rcx
  sub    %rbp,%rcx
  cmp    %r12,%rcx
  jge    L74
  mov    %rdx,%rax
L41:
  movzbl (%rax),%edx
  mov    %edx,%ecx
  sub    $0x1,%edx
  cmp    $0x7e,%edx
  jbe    L138
L73:
  cmp    $0xc1,%cl
  ja     L250
  je     L0
  mov    0x8(%rsp),%rbx
  lea    0x0(%rbp,%rbx,1),%rdx
  cmp    %rdx,%rax
  ja     L250
  cmp    $0x1,%cl
  mov    $0x1,%edx
  sbb    $0xffffffffffffffff,%rdx
L185:
  lea    (%rax,%rdx,1),%r14
  lea    0x0(%rbp,%r12,1),%rdx
  movzbl 0x8(%r14),%ecx
  movzbl 0x9(%r14),%eax
  shl    $0x8,%ecx
  lea    (%rcx,%rax,1),%ebx
  movslq %ebx,%rax
  add    %r14,%rax
  cmp    %rdx,%rax
  ja     L250
  movzbl 0x1(%r14),%esi
  mov    (%rsp),%rax
  lea    0xa(%r14),%rdx
  mov    %rbp,%r8
  mov    %ebx,%ecx
  mov    %r13,%rdi
  call   *%rax
  test   %eax,%eax
  js     L250
  lea    0xa(%rbx),%eax
  cltq
  add    %r14,%rax
  sub    $0x1,%r15d
  jae    L153
L18:
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L293:
  movzbl 0x1(%rax),%ecx
  mov    %rdx,%rax
  cmp    $0xc1,%cl
  jbe    L262
L250:
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L142:
  cmpb   $0xff,0x1(%rax)
  je     L250
  cmp    %r9,%rax
  ja     L250
  mov    $0x6,%edx
  jmp    L87
  nopl   (%rax)
L74:
  movzbl 0x1(%rax),%ecx
  mov    %rdx,%rax
  jmp    L73
L0:
  cmpb   $0xff,0x1(%rax)
  je     L250
  mov    0x8(%rsp),%rbx
  lea    0x0(%rbp,%rbx,1),%rdx
  cmp    %rdx,%rax
  ja     L250
  mov    $0x2,%edx
  jmp    L185
```

assistant: ```c
int __dns_parse(const unsigned char *r, int rlen, int (*callback)(void *, int, const void *, int, const void *), void *ctx) {
  int qdcount, ancount;
  const unsigned char *p;
  int len;
  if (rlen < 12)
    return -1;
  if ((r[3] & 15))
    return 0;
  p = r + 12;
  qdcount = r[4] * 256 + r[5];
  ancount = r[6] * 256 + r[7];
  if (qdcount + ancount > 64)
    return -1;
  while (qdcount--) {
    while (p - r < rlen && *p - 1U < 127)
      p++;
    if (*p > 193 || (*p == 193 && p[1] > 254) || p > r + rlen - 6)
      return -1;
    p += 5 + !!*p;
  }
  while (ancount--) {
    while (p - r < rlen && *p - 1U < 127)
      p++;
    if (*p > 193 || (*p == 193 && p[1] > 254) || p > r + rlen - 6)
      return -1;
    p += 1 + !!*p;
    len = p[8] * 256 + p[9];
    if (p + len > r + rlen)
      return -1;
    if (callback(ctx, p[1], p + 10, len, r) < 0)
      return -1;
    p += 10 + len;
  }
  return 0;
}
```