user: 请将以下的汇编代码转换成C语言代码：

```asm
<dns_comp>:
  endbr64
  cmp    %rdx,%rsi
  ja     L101
  push   %r12
  mov    %rsi,%r11
  push   %rbp
  push   %rbx
  movzbl (%rdi),%eax
  mov    %rdx,%rbx
  test   %al,%al
  je     L228
  nopw   0x0(%rax,%rax,1)
L226:
  cmp    $0x2e,%al
  je     L102
L133:
  mov    $0x1,%eax
  jmp    L122
  nopw   0x0(%rax,%rax,1)
L15:
  test   %dl,%dl
  je     L154
L122:
  movzbl (%rdi,%rax,1),%edx
  lea    -0x1(%rax),%ecx
  mov    %eax,%r9d
  mov    %eax,%r10d
  mov    %rax,%r8
  mov    %ecx,%esi
  add    $0x1,%rax
  cmp    $0x2e,%dl
  jne    L15
L154:
  cmp    $0x3f,%r10d
  jg     L204
  lea    (%r11,%r8,1),%rax
  cmp    %rax,%rbx
  jb     L204
  mov    %r11,%rax
  mov    %r8b,(%r11)
  lea    0x1(%r11),%rbp
  sub    %rdi,%rax
  cmp    $0xe,%rax
  jbe    L246
  cmp    $0x6,%ecx
  jbe    L246
  cmp    $0xe,%ecx
  jbe    L247
  movdqu (%rdi),%xmm0
  mov    %r9d,%eax
  shr    $0x4,%eax
  movups %xmm0,0x1(%r11)
  cmp    $0x1,%eax
  je     L158
  movdqu 0x10(%rdi),%xmm1
  movups %xmm1,0x11(%r11)
  cmp    $0x3,%eax
  jne    L158
  movdqu 0x20(%rdi),%xmm2
  movups %xmm2,0x21(%r11)
L158:
  mov    %r9d,%r12d
  mov    %ecx,%esi
  and    $0xfffffff0,%r12d
  mov    %r12d,%r10d
  sub    %r12d,%esi
  lea    (%rdi,%r10,1),%rdx
  lea    0x0(%rbp,%r10,1),%rax
  cmp    %r9d,%r12d
  je     L95
  lea    0x1(%rsi),%r9d
  cmp    $0x6,%esi
  jbe    L182
L106:
  mov    (%rdi,%r10,1),%rcx
  mov    %rcx,0x1(%r11,%r10,1)
  mov    %r9d,%ecx
  and    $0xfffffff8,%ecx
  mov    %ecx,%r10d
  sub    %ecx,%esi
  add    %r10,%rdx
  add    %r10,%rax
  cmp    %ecx,%r9d
  je     L95
L182:
  movzbl (%rdx),%ecx
  mov    %cl,(%rax)
  test   %esi,%esi
  je     L95
  movzbl 0x1(%rdx),%ecx
  mov    %cl,0x1(%rax)
  cmp    $0x1,%esi
  je     L95
  movzbl 0x2(%rdx),%ecx
  mov    %cl,0x2(%rax)
  cmp    $0x2,%esi
  je     L95
  movzbl 0x3(%rdx),%ecx
  mov    %cl,0x3(%rax)
  cmp    $0x3,%esi
  je     L95
  movzbl 0x4(%rdx),%ecx
  mov    %cl,0x4(%rax)
  cmp    $0x4,%esi
  je     L95
  movzbl 0x5(%rdx),%ecx
  mov    %cl,0x5(%rax)
  cmp    $0x5,%esi
  je     L95
  movzbl 0x6(%rdx),%edx
  mov    %dl,0x6(%rax)
L95:
  add    %r8,%rdi
  lea    0x0(%rbp,%r8,1),%r11
L289:
  movzbl (%rdi),%eax
  cmp    $0x2e,%al
  je     L255
  test   %al,%al
  jne    L226
L228:
  lea    0x1(%r11),%rax
  cmp    %rbx,%rax
  ja     L204
  movb   $0x0,(%r11)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L255:
  movzbl 0x1(%rdi),%eax
  lea    0x1(%rdi),%rdx
  test   %al,%al
  je     L228
  mov    %rdx,%rdi
  cmp    $0x2e,%al
  jne    L133
L102:
  cmp    %r11,%rbx
  jb     L204
  movb   $0x0,(%r11)
  add    $0x1,%r11
  jmp    L289
  cs nopw 0x0(%rax,%rax,1)
L246:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L35:
  movzbl (%rdi,%rax,1),%edx
  mov    %dl,0x1(%r11,%rax,1)
  add    $0x1,%rax
  cmp    %r8,%rax
  jne    L35
  jmp    L95
L204:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L247:
  mov    %rbp,%rax
  mov    %rdi,%rdx
  xor    %r10d,%r10d
  jmp    L106
L101:
  xor    %eax,%eax
  ret
```

assistant: ```c
char *dns_comp(const char *host, char *comp, char *end) {
  int x;
  if (comp > end)
    return NULL;
  while (*host) {
    for (x = 0; host[x]; ++x)
      if (host[x] == '.')
        break;
    if (x > 63)
      return NULL;
    if (comp + x > end)
      return NULL;
    *(comp++) = x;
    while (x--)
      *(comp++) = *(host++);
    if (*host == '.')
      ++host;
  }
  if (comp + 1 > end)
    return NULL;
  *(comp++) = '\0';
  return comp;
}
```