user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<read_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x100,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L50
L28:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xbf,%al
  jbe    L66
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  sub    $0xc000,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  movl   $0x1,-0x18(%rbp)
  jmp    L73
L66:
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,(%rdx)
L73:
  addq   $0x1,-0x28(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  jne    L50
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
L50:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L28
  mov    -0x1c(%rbp),%edx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  cmpl   $0x1,-0x18(%rbp)
  jne    L35
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
L35:
  movl   $0x0,-0x14(%rbp)
  jmp    L75
L84:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L79
L22:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x14(%rbp)
  addl   $0x1,-0x10(%rbp)
L79:
  mov    -0x1c(%rbp),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L22
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2e,(%rax)
  addl   $0x1,-0x14(%rbp)
L75:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x14(%rbp)
  jl     L84
  mov    -0x14(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *read_name(unsigned char *read, unsigned char *buf, int *count) {
  unsigned char *name;
  unsigned int p, jump, offset;
  int i, j;
  p = jump = offset = 0;
  *count = 1;
  name = (unsigned char *)malloc(256);
  name[0] = '\0';
  while (*read != 0) {
    if (*read >= 192) {
      offset = ((*read) << 8) + *(read + 1) - 49152;
      read = buf + offset - 1;
      jump = 1;
    } else {
      name[p++] = *read;
    }
    read = read + 1;
    if (jump == 0) {
      *count = *count + 1;
    }
  }
  name[p] = '\0';
  if (jump == 1) {
    *count = *count + 1;
  }
  for (i = 0; i < (int)strlen((const char *)name); i++) {
    p = name[i];
    for (j = 0; j < (int)p; j++) {
      name[i] = name[i + 1];
      i = i + 1;
    }
    name[i] = '.';
  }
  name[i - 1] = '\0';
  return name;
}
```