user: 请从给定的汇编指令推导出C源代码：

```asm
<cpu_get_performance_info>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x450,%rsp
  mov    %rdi,-0x448(%rbp)
  mov    %rsi,-0x450(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x418(%rbp)
  movq   $0x0,-0x430(%rbp)
  movq   $0x0,-0x428(%rbp)
  cmpq   $0x0,-0x448(%rbp)
  je     L247
  mov    -0x448(%rbp),%rax
  movq   $0x0,(%rax)
L247:
  cmpq   $0x0,-0x450(%rbp)
  je     L190
  mov    -0x450(%rbp),%rax
  movq   $0x0,(%rax)
L190:
  lea    D18(%rip),%rax
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x418(%rbp)
  cmpq   $0x0,-0x418(%rbp)
  je     L16
  jmp    L246
L55:
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x434(%rbp)
  mov    -0x434(%rbp),%eax
  cmp    $0x3fd,%eax
  ja     L250
  jmp    L203
L257:
  subl   $0x1,-0x434(%rbp)
  mov    -0x434(%rbp),%eax
  cltq
  movb   $0x0,-0x410(%rbp,%rax,1)
L203:
  cmpl   $0x0,-0x434(%rbp)
  jle    L35
  mov    -0x434(%rbp),%eax
  sub    $0x1,%eax
  cltq
  movzbl -0x410(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L257
L35:
  lea    -0x410(%rbp),%rax
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x420(%rbp)
  cmpq   $0x0,-0x420(%rbp)
  je     L129
  mov    -0x420(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L129
  addq   $0x2,-0x420(%rbp)
  jmp    L0
L129:
  cmpq   $0x0,-0x420(%rbp)
  je     L0
  addq   $0x1,-0x420(%rbp)
L0:
  lea    -0x410(%rbp),%rax
  mov    $0xa,%edx
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  jne    L155
  cmpq   $0x0,-0x430(%rbp)
  je     L128
  mov    -0x430(%rbp),%rax
  mov    %rax,%rdi
  call   <xfree@plt>
L128:
  mov    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <xstrdup@plt>
  mov    %rax,-0x430(%rbp)
  cmpq   $0x0,-0x428(%rbp)
  je     L246
  jmp    L127
L155:
  lea    -0x410(%rbp),%rax
  mov    $0x7,%edx
  lea    D0(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  jne    L246
  cmpq   $0x0,-0x428(%rbp)
  je     L220
  mov    -0x428(%rbp),%rax
  mov    %rax,%rdi
  call   <xfree@plt>
L220:
  mov    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <xstrdup@plt>
  mov    %rax,-0x428(%rbp)
  cmpq   $0x0,-0x430(%rbp)
  jne    L212
L246:
  mov    -0x418(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L55
  jmp    L127
L212:
  nop
L127:
  mov    -0x418(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  cmpq   $0x0,-0x448(%rbp)
  je     L33
  mov    -0x448(%rbp),%rax
  mov    -0x430(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L109
L33:
  mov    -0x430(%rbp),%rax
  mov    %rax,%rdi
  call   <xfree@plt>
L109:
  cmpq   $0x0,-0x450(%rbp)
  je     L124
  mov    -0x450(%rbp),%rax
  mov    -0x428(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L14
L124:
  mov    -0x428(%rbp),%rax
  mov    %rax,%rdi
  call   <xfree@plt>
  jmp    L14
L16:
  nop
  jmp    L219
L250:
  nop
L219:
  cmpq   $0x0,-0x418(%rbp)
  je     L14
  mov    -0x418(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
L14:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L38
  call   <__stack_chk_fail@plt>
L38:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D18
datatype: string
name: read_data
arguments: data_label: D24
datatype: string
name: read_data
arguments: data_label: D26
datatype: string
name: read_data
arguments: data_label: D0
datatype: string

tool: D18: r

tool: D24: /proc/cpuinfo

tool: D26: model name

tool: D0: cpu mhz

assistant: ```c
void cpu_get_performance_info(unsigned char **p_model, unsigned char **p_mhz) {
  FILE *f = NULL;
  unsigned char buf[1024];
  unsigned char *model = NULL;
  unsigned char *mhz = NULL;
  if (p_model)
    *p_model = NULL;
  if (p_mhz)
    *p_mhz = NULL;
  if (!(f = fopen("/proc/cpuinfo", "r")))
    goto failure;
  while (fgets(buf, sizeof(buf), f)) {
    int buflen = strlen(buf);
    if (buflen > sizeof(buf) - 3)
      goto failure;
    while (buflen > 0 && isspace(buf[buflen - 1]))
      buf[--buflen] = 0;
    unsigned char *s = strchr(buf, ':');
    if (s && s[1] == ' ')
      s += 2;
    else if (s)
      ++s;
    if (!strncasecmp(buf, "model name", 10)) {
      if (model)
        xfree(model);
      model = xstrdup(s);
      if (mhz)
        break;
    } else if (!strncasecmp(buf, "cpu mhz", 7)) {
      if (mhz)
        xfree(mhz);
      mhz = xstrdup(s);
      if (model)
        break;
    }
  }
  fclose(f);
  if (p_model)
    *p_model = model;
  else
    xfree(model);
  if (p_mhz)
    *p_mhz = mhz;
  else
    xfree(mhz);
  return;
failure:
  if (f)
    fclose(f);
}
```