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

```asm
<readKV>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x450,%rsp
  mov    %rdi,-0x438(%rbp)
  mov    %rsi,-0x440(%rbp)
  mov    %rdx,-0x448(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x410(%rbp),%rax
  mov    $0x400,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x440(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x424(%rbp)
  jmp    L105
L134:
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <isCommentLine@plt>
  test   %rax,%rax
  je     L65
  jmp    L105
L65:
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <isLabel@plt>
  test   %rax,%rax
  jne    L60
  lea    -0x410(%rbp),%rax
  lea    D0(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x420(%rbp)
  cmpq   $0x0,-0x420(%rbp)
  jne    L166
  jmp    L105
L166:
  mov    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <trim@plt>
  mov    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x424(%rbp)
  jne    L105
  mov    -0x440(%rbp),%rdx
  mov    -0x420(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L78
  jmp    L105
L78:
  lea    D8(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x418(%rbp)
  cmpq   $0x0,-0x418(%rbp)
  jne    L99
  mov    -0x438(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L62
L99:
  mov    -0x418(%rbp),%rax
  mov    %rax,%rdi
  call   <trim@plt>
  mov    -0x418(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jne    L101
  mov    -0x438(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L62
L101:
  mov    -0x418(%rbp),%rdx
  mov    -0x448(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x438(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  jmp    L62
L105:
  mov    -0x438(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L134
  jmp    L67
L60:
  nop
L67:
  mov    -0x438(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
L62:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L53
  call   <__stack_chk_fail@plt>
L53:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D0
type: string
name: retrieve_data
arguments: data_label: D8
type: string

tool: D0: =

tool: D8: #

assistant: ```c
int readKV(FILE *file, const char *key, char *value) {
  char buffer[1024];
  memset(buffer, 0, 1024);
  int key_len = strlen(key);
  while (fgets(buffer, 1024, file) != NULL) {
    if (isCommentLine(buffer)) {
      continue;
    }
    if (isLabel(buffer)) {
      break;
    }
    char *t_key = strtok(buffer, "=");
    if (t_key == NULL) {
      continue;
    }
    trim(t_key);
    if (strlen(t_key) != key_len || strcmp(t_key, key) != 0) {
      continue;
    }
    char *t_value = strtok(NULL, "#");
    if (t_value == NULL) {
      fclose(file);
      return -1;
    }
    trim(t_value);
    if (strlen(t_value) == 0) {
      fclose(file);
      return -1;
    }
    strcpy(value, t_value);
    fclose(file);
    return 0;
  }
  fclose(file);
  return -1;
}
```