user: 这段汇编代码用C语言表示是什么样的:

```asm
<get_cmd_line_value>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x428,%rsp
  mov    %rdi,(%rsp)
  mov    %esi,0xc(%rsp)
  mov    %rdx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  lea    D12(%rip),%rdi
  call   <getenv@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  lea    D47(%rip),%rax
  cmove  %rax,%rbx
  lea    D35(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L37
  mov    %rax,%r13
  lea    0x10(%rsp),%rdi
  mov    %rax,%rdx
  mov    $0x400,%esi
  call   <fgets@plt>
  mov    $0xffffffff,%ebp
  test   %rax,%rax
  jne    L111
L90:
  mov    %r13,%rdi
  call   <fclose@plt>
L15:
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  mov    %ebp,%eax
  add    $0x428,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L37:
  mov    %rbx,%rsi
  lea    D36(%rip),%rdi
  call   <log_msg@plt>
  mov    $0xffffffff,%ebp
  jmp    L15
L111:
  lea    0x10(%rsp),%rdi
  lea    D10(%rip),%rsi
  call   <strtok@plt>
  mov    %rax,%rbx
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%r14d
  test   %rbx,%rbx
  je     L41
  lea    D10(%rip),%r15
L57:
  mov    %r14d,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  je     L30
  mov    %r15,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  jne    L57
  mov    $0xffffffff,%ebp
  jmp    L90
L30:
  lea    D22(%rip),%r12
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strtok@plt>
  mov    %r12,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  test   %rax,%rax
  je     L60
  mov    0xc(%rsp),%edx
  mov    %rax,%rsi
  mov    (%rsp),%rdi
  call   <strncpy@plt>
  jmp    L90
L41:
  mov    $0xffffffff,%ebp
  jmp    L90
L60:
  mov    $0xffffffff,%ebp
  jmp    L90
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D12
type_guessed: string
name: parse_data
arguments: tag: D47
type_guessed: string
name: parse_data
arguments: tag: D35
type_guessed: string
name: parse_data
arguments: tag: D36
type_guessed: string
name: parse_data
arguments: tag: D10
type_guessed: string
name: parse_data
arguments: tag: D22
type_guessed: string

tool: D12: CMDLINE_PATH

tool: D47: /proc/cmdline

tool: D35: r

tool: D36: Could not open %s


tool: D10:  ,

tool: D22: =

assistant: ```c
int get_cmd_line_value(char *get_value, int max_len, char *key) {
  const char *cmdline_path;
  FILE *cmdline_file;
  char cmdline[1024];
  int ret = -1;
  int keylen;
  char *key_and_value;
  char *value;
  cmdline_path = getenv("CMDLINE_PATH");
  cmdline_path = cmdline_path ? cmdline_path : "/proc/cmdline";
  cmdline_file = fopen(cmdline_path, "r");
  if (!cmdline_file) {
    log_msg("Could not open %s\n", cmdline_path);
    return -1;
  }
  if (fgets(cmdline, 1024, cmdline_file)) {
    key_and_value = strtok(cmdline, " ,");
    keylen = strlen(key);
    while (key_and_value != NULL) {
      if (!strncmp(key_and_value, key, keylen)) {
        value = strtok(key_and_value, "=");
        value = strtok(NULL, "=");
        if (value) {
          strncpy(get_value, value, max_len);
          ret = 0;
        }
        break;
      }
      key_and_value = strtok(NULL, " ,");
    }
  }
  fclose(cmdline_file);
  return ret;
}
```