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

```asm
<read_dns_name>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rdx,%r13
  movslq %ecx,%rcx
  lea    (%rdi,%rcx,4),%r14
  mov    %rdx,%rbx
  mov    $0x0,%ecx
  mov    $0x0,%ebp
  lea    0x100(%rdx),%r15
L90:
  mov    (%rsi),%edi
  mov    %edi,%eax
  and    $0xc0,%eax
  cmp    $0xc0,%eax
  je     L14
  test   %edi,%edi
  je     L472
  lea    0x4(%rsi),%rax
  cmp    $0x1,%ecx
  adc    $0x0,%ebp
  test   %edi,%edi
  jle    L206
  lea    0x8(%rsi),%rax
  mov    %edi,%edi
  add    %rbx,%rdi
  jmp    L444
L14:
  call   <ntohs@plt>
  sub    $0xc000,%eax
  cltq
  lea    (%r12,%rax,4),%rsi
  cmp    %rsi,%r12
  ja     L275
  cmp    %rsi,%r14
  jb     L275
  add    $0x2,%ebp
  cmp    $0x100,%ebp
  ja     L286
  cmp    %r15,%rbx
  ja     L278
  cmp    %r13,%rbx
  jb     L278
  mov    $0x1,%ecx
  jmp    L90
L472:
  test   %ebp,%ebp
  jle    L313
  movb   $0x0,-0x1(%rbx)
  test   %ecx,%ecx
  jne    L219
  cmp    %r12,%rsi
  jb     L205
  cmp    %rsi,%r14
  jb     L205
  add    $0x1,%ebp
  cmp    $0x100,%ebp
  ja     L205
  lea    0x100(%r13),%rax
  cmp    %rax,%rbx
  ja     L205
  cmp    %r13,%rbx
  cmovae %ebp,%ecx
  jmp    L205
L313:
  movb   $0x0,(%rbx)
  mov    %ebp,%ecx
  jmp    L205
L67:
  cmp    %rax,%r12
  ja     L218
  cmp    %rax,%r14
  jb     L218
  cmp    $0x100,%ebp
  ja     L53
L414:
  add    $0x1,%rbx
  cmp    %r15,%rbx
  ja     L87
  cmp    %rbx,%r13
  ja     L87
  add    $0x4,%rax
  cmp    %rdi,%rbx
  je     L478
L444:
  mov    %rax,%rsi
  mov    -0x4(%rax),%edx
  mov    %dl,(%rbx)
  test   %ecx,%ecx
  jne    L67
  lea    -0x4(%rax),%rdx
  cmp    %rdx,%r12
  ja     L205
  cmp    %rdx,%r14
  jb     L205
  add    $0x1,%ebp
  cmp    $0x100,%ebp
  ja     L205
  cmp    %r15,%rbx
  ja     L205
  cmp    %rbx,%r13
  ja     L205
  cmp    %rax,%r12
  ja     L205
  cmp    %rax,%r14
  jae    L414
  jmp    L205
L206:
  movb   $0x2e,(%rbx)
  cmp    %r12,%rax
  jb     L130
  cmp    %rax,%r14
  jb     L130
  cmp    $0x100,%ebp
  ja     L17
  mov    %rax,%rsi
  jmp    L138
L275:
  mov    $0x0,%ecx
  jmp    L205
L286:
  mov    $0x0,%ecx
  jmp    L205
L278:
  mov    $0x0,%ecx
L205:
  mov    %ecx,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L219:
  mov    %ebp,%ecx
  jmp    L205
L218:
  mov    $0x0,%ecx
  jmp    L205
L53:
  mov    $0x0,%ecx
  jmp    L205
L87:
  mov    $0x0,%ecx
  jmp    L205
L130:
  mov    $0x0,%ecx
  jmp    L205
L17:
  mov    $0x0,%ecx
  jmp    L205
L82:
  mov    $0x0,%ecx
  jmp    L205
L478:
  movb   $0x2e,(%rbx)
  cmp    %rsi,%r12
  ja     L82
  cmp    %rsi,%r14
  jb     L82
L138:
  add    $0x1,%rbx
  cmp    %r15,%rbx
  ja     L412
  cmp    %rbx,%r13
  jbe    L90
L412:
  mov    $0x0,%ecx
  jmp    L205
```

assistant: ```c
int read_dns_name(u_char *base, u_char *ptr, char *name, int psize) {
  u_char c;
  int len;
  int count = 0, compressed = 0;
  char *base_name = name;
  for (;;) {
    int i;
    c = *ptr;
    if ((c & 0xc0) == 0xc0) {
      int offset;
      offset = (ntohs(*(u_short *)(ptr)) - 0xc000);
      ptr = base;
      do {
        ptr += offset;
        if ((ptr > (base + psize)) || (ptr < base))
          return 0;
        count += 2;
        if ((count > 256) || (count < 0))
          return 0;
        name += 0;
        if ((name > (base_name + 256)) || (name < base_name))
          return 0;
      } while (0);
      compressed = 1;
      continue;
    }
    len = c;
    if (len == 0) {
      if (count > 0) {
        *(name - 1) = '\0';
        if (!compressed)
          do {
            ptr += 0;
            if ((ptr > (base + psize)) || (ptr < base))
              return 0;
            count += 1;
            if ((count > 256) || (count < 0))
              return 0;
            name += 0;
            if ((name > (base_name + 256)) || (name < base_name))
              return 0;
          } while (0);
      } else {
        *name = '\0';
      }
      break;
    }
    ptr++;
    if (!compressed)
      count++;
    for (i = 0; i < len; i++) {
      *name = *ptr;
      if (!compressed)
        do {
          ptr += 0;
          if ((ptr > (base + psize)) || (ptr < base))
            return 0;
          count += 1;
          if ((count > 256) || (count < 0))
            return 0;
          name += 0;
          if ((name > (base_name + 256)) || (name < base_name))
            return 0;
        } while (0);
      do {
        ptr += 1;
        if ((ptr > (base + psize)) || (ptr < base))
          return 0;
        count += 0;
        if ((count > 256) || (count < 0))
          return 0;
        name += 1;
        if ((name > (base_name + 256)) || (name < base_name))
          return 0;
      } while (0);
    }
    *name = '.';
    do {
      ptr += 0;
      if ((ptr > (base + psize)) || (ptr < base))
        return 0;
      count += 0;
      if ((count > 256) || (count < 0))
        return 0;
      name += 1;
      if ((name > (base_name + 256)) || (name < base_name))
        return 0;
    } while (0);
  }
  return count;
}
```