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

```asm
<dns_decode_reverse_name>:
  endbr64
  push   %rbx
  mov    $0x1,%edx
  xor    %r8d,%r8d
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L28:
  cmpb   $0x2e,-0x1(%rdi,%rdx,1)
  jne    L49
  add    $0x1,%r8d
L49:
  cmp    $0x2,%r8d
  mov    %edx,%eax
  setle  %sil
  cmp    $0xfd,%edx
  setle  %cl
  add    $0x1,%rdx
  test   %cl,%sil
  jne    L28
  movslq %eax,%r8
  movzbl (%rdi,%r8,1),%edx
  cmp    $0x2e,%dl
  je     L115
  mov    %rsp,%rsi
  add    $0x1,%eax
  xor    %ecx,%ecx
  mov    %rsi,%rbx
  cltq
  sub    %r8,%rbx
  nopl   0x0(%rax,%rax,1)
L88:
  mov    %dl,-0x1(%rbx,%rax,1)
  movzbl (%rdi,%rax,1),%edx
  movslq %ecx,%r8
  lea    (%rdi,%rax,1),%r11
  lea    0x1(%r8),%ecx
  cmp    $0x2e,%dl
  setne  %r10b
  cmp    $0xff,%eax
  setne  %r9b
  add    $0x1,%rax
  test   %r9b,%r10b
  jne    L88
  movslq %ecx,%rcx
  movb   $0x0,(%r11)
  mov    $0x1,%eax
  xor    %edx,%edx
  movb   $0x2e,(%rsp,%rcx,1)
L15:
  cmpb   $0x2e,-0x1(%rdi,%rax,1)
  je     L62
L84:
  add    $0x1,%rax
  cmpb   $0x2e,-0x1(%rdi,%rax,1)
  jne    L84
L62:
  add    $0x1,%edx
  mov    %eax,%ecx
  add    $0x1,%rax
  cmp    $0x2,%edx
  jne    L15
  movslq %ecx,%r10
  lea    0x2(%r8),%edx
  movzbl (%rdi,%r10,1),%r9d
  cmp    $0x2e,%r9b
  je     L132
  lea    0x3(%r8),%eax
  sub    %r8,%r10
  lea    -0x1(%rsp),%rcx
  cltq
  lea    (%rdi,%r10,1),%r8
  nopw   0x0(%rax,%rax,1)
L66:
  mov    %r9b,(%rcx,%rax,1)
  mov    %eax,%edx
  add    $0x1,%rax
  movzbl -0x3(%r8,%rax,1),%r9d
  cmp    $0x2e,%r9b
  jne    L66
L132:
  movslq %edx,%r10
  lea    0x1(%rdx),%eax
  mov    $0x1,%ecx
  movb   $0x2e,(%rsp,%r10,1)
  xchg   %ax,%ax
L85:
  movzbl -0x1(%rdi,%rcx,1),%r9d
  mov    %ecx,%r8d
  add    $0x1,%rcx
  cmp    $0x2e,%r9b
  jne    L85
  movslq %r8d,%r9
  movzbl (%rdi,%r9,1),%r8d
  cmp    $0x2e,%r8b
  je     L22
  add    $0x2,%edx
  sub    %r10,%r9
  lea    -0x1(%rsp),%rcx
  movslq %edx,%rdx
  add    %rdi,%r9
  nopw   0x0(%rax,%rax,1)
L144:
  mov    %r8b,(%rcx,%rdx,1)
  mov    %edx,%eax
  add    $0x1,%rdx
  movzbl -0x2(%r9,%rdx,1),%r8d
  cmp    $0x2e,%r8b
  jne    L144
L22:
  movzbl (%rdi),%edx
  movslq %eax,%r10
  lea    0x1(%rax),%r8d
  movb   $0x2e,(%rsp,%r10,1)
  cmp    $0x2e,%dl
  je     L94
  add    $0x2,%eax
  mov    %rdi,%r9
  lea    -0x1(%rsp),%rcx
  cltq
  sub    %r10,%r9
  nopw   0x0(%rax,%rax,1)
L46:
  mov    %dl,(%rcx,%rax,1)
  mov    %eax,%r8d
  add    $0x1,%rax
  movzbl -0x2(%r9,%rax,1),%edx
  cmp    $0x2e,%dl
  jne    L46
L94:
  movslq %r8d,%r8
  movb   $0x0,(%rsp,%r8,1)
  call   <strcpy@plt>
L115:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L16
  add    $0x110,%rsp
  pop    %rbx
  ret
L16:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void dns_decode_reverse_name(char *name) {
  char temp[256];
  int i, j, k;
  k = 0;
  for (j = 0, i = 0; j < 3 && i < 256 - 2; i++) {
    if (name[i] == '.')
      j++;
  }
  for (; name[i] != '.' && i < 256 - 1; i++) {
    temp[k++] = name[i];
  }
  if (k == 0)
    return;
  temp[k++] = '.';
  name[i] = 0;
  for (j = 0, i = 0; j < 2; i++)
    if (name[i] == '.')
      j++;
  for (; name[i] != '.'; i++)
    temp[k++] = name[i];
  temp[k++] = '.';
  for (j = 0, i = 0; j < 1; i++)
    if (name[i] == '.')
      j++;
  for (; name[i] != '.'; i++)
    temp[k++] = name[i];
  temp[k++] = '.';
  for (i = 0; name[i] != '.'; i++)
    temp[k++] = name[i];
  temp[k] = 0;
  strcpy(name, temp);
}
```