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

```asm
<abbreviate>:
  endbr64
  test   %rdi,%rdi
  je     L38
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  mov    %rax,%rbx
  cmp    %r13d,%eax
  jl     L44
  mov    %r13d,%edi
  call   <malloc@plt>
  lea    -0x6(%r13),%edx
  mov    %edx,%ecx
  mov    %rax,%r12
  shr    $0x1f,%ecx
  add    %edx,%ecx
  sar    %ecx
  cmp    $0x4,%r13d
  jle    L385
  xor    %edi,%edi
  lea    0x1(%rbp),%rsi
  test   %ecx,%ecx
  mov    %rax,%rdx
  cmovns %ecx,%edi
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L245
  cmp    $0x6,%edi
  jbe    L245
  lea    0x1(%rdi),%r8d
  cmp    $0xe,%edi
  jbe    L53
  mov    %r8d,%esi
  mov    %rbp,%r9
  mov    %rax,%rdx
  shr    $0x4,%esi
  sub    %rax,%r9
  shl    $0x4,%rsi
  add    %rax,%rsi
  nopw   0x0(%rax,%rax,1)
L93:
  movdqu (%rdx,%r9,1),%xmm0
  add    $0x10,%rdx
  movups %xmm0,-0x10(%rdx)
  cmp    %rdx,%rsi
  jne    L93
  mov    %r8d,%esi
  and    $0xfffffff0,%esi
  mov    %esi,%edx
  cmp    %esi,%r8d
  je     L385
  sub    %esi,%edi
  lea    0x1(%rdi),%r8d
  cmp    $0x6,%edi
  jbe    L120
L238:
  mov    0x0(%rbp,%rsi,1),%rdi
  mov    %rdi,(%rax,%rsi,1)
  mov    %r8d,%esi
  and    $0xfffffff8,%esi
  add    %esi,%edx
  cmp    %esi,%r8d
  je     L385
L120:
  movslq %edx,%rsi
  movzbl 0x0(%rbp,%rsi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x1(%rdx),%esi
  cmp    %esi,%ecx
  jl     L385
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rsi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x2(%rdx),%esi
  cmp    %esi,%ecx
  jl     L385
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rsi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x3(%rdx),%esi
  cmp    %esi,%ecx
  jl     L385
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rsi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x4(%rdx),%esi
  cmp    %esi,%ecx
  jl     L385
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rsi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x5(%rdx),%esi
  cmp    %esi,%ecx
  jl     L385
  movslq %esi,%rsi
  add    $0x6,%edx
  movzbl 0x0(%rbp,%rsi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  cmp    %edx,%ecx
  jl     L385
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %sil,(%rax,%rdx,1)
L385:
  movslq %ecx,%rsi
  movb   $0x20,0x1(%rax,%rsi,1)
  movb   $0x2e,0x2(%rax,%rsi,1)
  movb   $0x2e,0x3(%rax,%rsi,1)
  movb   $0x2e,0x4(%rax,%rsi,1)
  movb   $0x20,0x5(%rax,%rsi,1)
  cmp    $0x4,%r13d
  jle    L103
  mov    %ebx,%r8d
  xor    %edi,%edi
  lea    (%rsi,%rax,1),%r9
  movslq %ebx,%rbx
  sub    %ecx,%r8d
  lea    0x6(%r9),%rdx
  lea    0x6(%rcx),%r10d
  test   %ecx,%ecx
  cmovns %ecx,%edi
  sub    %rsi,%rbx
  mov    %rdx,%r11
  lea    0x1(%rbp,%rbx,1),%r13
  sub    %r13,%r11
  cmp    $0xe,%r11
  jbe    L298
  cmp    $0x6,%edi
  jbe    L298
  lea    0x1(%rdi),%r11d
  cmp    $0xe,%edi
  jbe    L373
  mov    %r11d,%esi
  shr    $0x4,%esi
  sub    $0x1,%esi
  shl    $0x4,%rsi
  lea    0x16(%r9,%rsi,1),%r13
  mov    %rbx,%rsi
  sub    %r9,%rsi
  add    %rbp,%rsi
  xchg   %ax,%ax
L102:
  movdqu -0x6(%rdx,%rsi,1),%xmm1
  add    $0x10,%rdx
  movups %xmm1,-0x10(%rdx)
  cmp    %r13,%rdx
  jne    L102
  mov    %r11d,%esi
  and    $0xfffffff0,%esi
  mov    %esi,%edx
  cmp    %esi,%r11d
  je     L103
  sub    %esi,%edi
  lea    0x1(%rdi),%r11d
  cmp    $0x6,%edi
  jbe    L78
L293:
  add    %rbp,%rbx
  mov    (%rbx,%rsi,1),%rdi
  mov    %rdi,0x6(%r9,%rsi,1)
  mov    %r11d,%esi
  and    $0xfffffff8,%esi
  add    %esi,%edx
  cmp    %esi,%r11d
  je     L103
L78:
  lea    (%r8,%rdx,1),%esi
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rsi,1),%edi
  lea    (%r10,%rdx,1),%esi
  movslq %esi,%rsi
  mov    %dil,(%rax,%rsi,1)
  lea    0x1(%rdx),%esi
  cmp    %esi,%ecx
  jl     L103
  lea    (%r8,%rsi,1),%edi
  add    %r10d,%esi
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rdi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x2(%rdx),%esi
  cmp    %esi,%ecx
  jl     L103
  lea    (%rsi,%r8,1),%edi
  add    %r10d,%esi
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rdi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x3(%rdx),%esi
  cmp    %esi,%ecx
  jl     L103
  lea    (%r8,%rsi,1),%edi
  add    %r10d,%esi
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rdi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x4(%rdx),%esi
  cmp    %esi,%ecx
  jl     L103
  lea    (%r8,%rsi,1),%edi
  add    %r10d,%esi
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rdi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  lea    0x5(%rdx),%esi
  cmp    %esi,%ecx
  jl     L103
  lea    (%r8,%rsi,1),%edi
  add    %r10d,%esi
  add    $0x6,%edx
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rdi,1),%edi
  mov    %dil,(%rax,%rsi,1)
  cmp    %edx,%ecx
  jl     L103
  add    %edx,%r8d
  add    %r10d,%edx
  movslq %r8d,%r8
  movslq %edx,%rdx
  movzbl 0x0(%rbp,%r8,1),%ecx
  mov    %cl,(%rax,%rdx,1)
  jmp    L103
  xchg   %ax,%ax
L44:
  mov    %rbp,%rdi
  call   <my_strdup@plt>
  mov    %rax,%r12
  jmp    L103
  nopl   (%rax)
L251:
  movb   $0x20,(%rax)
L103:
  mov    $0xa,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L251
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L38:
  lea    D0(%rip),%rdi
  jmp    10b0 <my_strdup@plt>
L245:
  xor    %edx,%edx
  cs nopw 0x0(%rax,%rax,1)
L100:
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %sil,(%rax,%rdx,1)
  add    $0x1,%rdx
  cmp    %edx,%ecx
  jge    L100
  jmp    L385
L298:
  xor    %edx,%edx
  lea    0x0(%rbp,%rbx,1),%r9
  nopl   (%rax)
L372:
  movzbl (%r9,%rdx,1),%r8d
  lea    (%rsi,%rdx,1),%rdi
  add    $0x1,%rdx
  mov    %r8b,0x6(%rax,%rdi,1)
  cmp    %edx,%ecx
  jge    L372
  jmp    L103
L53:
  xor    %esi,%esi
  xor    %edx,%edx
  jmp    L238
L373:
  xor    %esi,%esi
  xor    %edx,%edx
  jmp    L293
```

tool_calls: name: disassemble_data
arguments: data_tag: D0
data_type: string

tool: D0: < EMPTY >

assistant: ```c
char *abbreviate(const char *s, int len) {
  char *t, *p;
  int i, n, half;
  if (s == NULL)
    return my_strdup("< EMPTY >");
  n = (int)strlen(s);
  if (n < len) {
    t = my_strdup(s);
  } else {
    t = (char *)malloc(len * sizeof(char));
    half = (len - 6) / 2;
    for (i = 0; i <= half; i++)
      t[i] = s[i];
    t[half + 1] = ' ';
    t[half + 2] = '.';
    t[half + 3] = '.';
    t[half + 4] = '.';
    t[half + 5] = ' ';
    for (i = 0; i <= half; i++)
      t[half + 6 + i] = s[n - half + i];
  }
  while ((p = strchr(t, '\n')))
    *p = ' ';
  return t;
}
```