user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<host_to_dns_name>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  jmp    L49
  nop
L5:
  test   %al,%al
  je     L133
L196:
  add    $0x1,%rbx
L49:
  mov    %r12,%rdi
  mov    %ebx,%r14d
  mov    %ebx,%ebp
  call   <strlen@plt>
  mov    %ebx,%ecx
  cmp    %ebx,%eax
  jl     L187
  movzbl (%r12,%rbx,1),%eax
  cmp    $0x2e,%al
  jne    L5
L133:
  mov    %ebx,%eax
  lea    0x1(%r15),%rdi
  sub    %r13d,%eax
  mov    %al,(%r15)
  cmp    %ecx,%r13d
  jge    L20
  movslq %r13d,%rax
  mov    %rdi,%rdx
  sub    %r13d,%r14d
  lea    0x1(%r12,%rax,1),%rsi
  lea    -0x1(%r14),%r8d
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L161
  cmp    $0x6,%r8d
  jbe    L161
  cmp    $0xe,%r8d
  jbe    L44
  mov    %r14d,%esi
  lea    (%r12,%rax,1),%rdx
  xor    %eax,%eax
  shr    $0x4,%esi
  shl    $0x4,%rsi
L24:
  movdqu (%rdx,%rax,1),%xmm0
  movups %xmm0,0x1(%r15,%rax,1)
  add    $0x10,%rax
  cmp    %rsi,%rax
  jne    L24
  mov    %r14d,%r9d
  and    $0xfffffff0,%r9d
  mov    %r9d,%eax
  add    %r9d,%r13d
  lea    (%rdi,%rax,1),%rsi
  cmp    %r9d,%r14d
  je     L209
  sub    %r9d,%r14d
  lea    -0x1(%r14),%r9d
  cmp    $0x6,%r9d
  jbe    L30
L76:
  mov    (%rdx,%rax,1),%rdx
  mov    %rdx,0x1(%r15,%rax,1)
  mov    %r14d,%eax
  and    $0xfffffff8,%eax
  mov    %eax,%edx
  add    %eax,%r13d
  add    %rdx,%rsi
  cmp    %eax,%r14d
  je     L209
L30:
  movslq %r13d,%rdx
  lea    0x1(%r13),%eax
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,(%rsi)
  cmp    %ecx,%eax
  jge    L209
  cltq
  lea    0x2(%r13),%edx
  movzbl (%r12,%rax,1),%eax
  mov    %al,0x1(%rsi)
  cmp    %ecx,%edx
  jge    L209
  movslq %edx,%rdx
  lea    0x3(%r13),%eax
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x2(%rsi)
  cmp    %eax,%ecx
  jle    L209
  cltq
  lea    0x4(%r13),%edx
  movzbl (%r12,%rax,1),%eax
  mov    %al,0x3(%rsi)
  cmp    %edx,%ecx
  jle    L209
  movslq %edx,%rdx
  lea    0x5(%r13),%eax
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x4(%rsi)
  cmp    %eax,%ecx
  jle    L209
  cltq
  add    $0x6,%r13d
  movzbl (%r12,%rax,1),%eax
  mov    %al,0x5(%rsi)
  cmp    %r13d,%ecx
  jle    L209
  movslq %r13d,%r13
  movzbl (%r12,%r13,1),%eax
  mov    %al,0x6(%rsi)
L209:
  lea    0x1(%rdi,%r8,1),%r15
L198:
  lea    0x1(%rbp),%r13d
  jmp    L196
  nop
L187:
  movb   $0x0,(%r15)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L161:
  sub    %rax,%r15
  nopl   0x0(%rax,%rax,1)
L96:
  movzbl (%r12,%rax,1),%edx
  mov    %dl,0x1(%r15,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L96
  jmp    L209
  nopl   0x0(%rax)
L20:
  mov    %r13d,%ebp
  mov    %rdi,%r15
  jmp    L198
L44:
  lea    (%r12,%rax,1),%rdx
  mov    %rdi,%rsi
  xor    %eax,%eax
  jmp    L76
```

assistant: ```c
void host_to_dns_name(char *dns, char *host) {
  for (int i = 0, count = 0; i < strlen(host) + 1; i++) {
    if (host[i] == '.' || host[i] == '\0') {
      *dns++ = i - count;
      while (count < i)
        *dns++ = host[count++];
      count++;
    }
  }
  *dns = '\0';
}
```