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

```asm
<store_cluster_attr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x20(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x50(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L97
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x30(%rbp)
L97:
  cmpq   $0x0,-0x30(%rbp)
  je     L57
  mov    -0x30(%rbp),%rax
  mov    $0x3b,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x30(%rbp),%rax
  movb   $0x0,(%rax)
  cmpq   $0x0,-0x28(%rbp)
  jne    L8
  lea    D85(%rip),%rax
  mov    %rax,-0x28(%rbp)
L8:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %ebx,%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  lea    D25(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  jmp    L77
L57:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
L77:
  cmpq   $0x0,-0x20(%rbp)
  je     L25
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %ebx,%eax
  jmp    L12
L25:
  mov    $0x0,%eax
L12:
  mov    %eax,-0x34(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %eax,%ebx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %ebx,%eax
  add    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x48(%rbp),%rdx
  mov    %rax,(%rdx)
  cmpq   $0x0,-0x20(%rbp)
  je     L23
  lea    D8(%rip),%rdx
  jmp    L94
L23:
  lea    D85(%rip),%rdx
L94:
  cmpq   $0x0,-0x20(%rbp)
  je     L89
  mov    -0x20(%rbp),%rax
  jmp    L6
L89:
  lea    D85(%rip),%rax
L6:
  mov    -0x48(%rbp),%rcx
  mov    (%rcx),%rdi
  mov    -0x58(%rbp),%rsi
  mov    -0x50(%rbp),%rcx
  mov    %rsi,%r9
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    %rax,%rdx
  lea    D45(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D5
type: string
name: extract_symbolic_data
arguments: data_label: D85
type: string
name: extract_symbolic_data
arguments: data_label: D25
type: string
name: extract_symbolic_data
arguments: data_label: D8
type: string
name: extract_symbolic_data
arguments: data_label: D68
type: string
name: extract_symbolic_data
arguments: data_label: D45
type: string

tool: D5: %s=

tool: 

tool: D25: %s%s

tool: D8: ;

tool: D68: =

tool: D45: %s%s%s=%s

assistant: ```c
void store_cluster_attr(char **metric, char *name, char *value) {
  char *pos = NULL, *rest;
  char *pattern;
  char *new_metric = NULL;
  int len;
  pattern = malloc(strlen(name) + 2);
  sprintf(pattern, "%s=", name);
  if (*metric)
    pos = strstr(*metric, pattern);
  if (pos) {
    rest = strchr(pos, ';');
    pos[0] = 0;
    if (rest == NULL)
      rest = "";
    new_metric = malloc(strlen(*metric) + strlen(rest) + 1);
    sprintf(new_metric, "%s%s", *metric, rest);
    free(*metric);
  } else
    (new_metric = *metric);
  len = new_metric ? (strlen(new_metric) + strlen(";")) : 0;
  len += strlen(name) + strlen("=") + strlen(value);
  *metric = malloc(len + 1);
  sprintf(*metric, "%s%s%s=%s", new_metric ? new_metric : "", new_metric ? ";" : "", name, value);
  free(new_metric);
  free(pattern);
}
```