user: Demonstrate the C code that generates the assembly output below:

```asm
<get_cmd_line_value>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x428,%rsp
  mov    %rdi,(%rsp)
  lea    D20(%rip),%rdi
  mov    %esi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  call   <getenv@plt>
  lea    D57(%rip),%rsi
  test   %rax,%rax
  mov    %rax,%r12
  lea    D42(%rip),%rax
  cmove  %rax,%r12
  mov    %r12,%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L25
  lea    0x10(%rsp),%r12
  mov    %rax,%rdx
  mov    $0x400,%esi
  mov    %rax,%rbp
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L46
L70:
  mov    $0xffffffff,%r14d
L96:
  mov    %rbp,%rdi
  call   <fclose@plt>
L33:
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x428,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L46:
  lea    D55(%rip),%r13
  mov    %r12,%rdi
  mov    %r13,%rsi
  call   <strtok@plt>
  mov    %rbx,%rdi
  mov    %rax,%r15
  call   <strlen@plt>
  mov    %eax,%r12d
  test   %r15,%r15
  jne    L86
  jmp    L70
  nopw   0x0(%rax,%rax,1)
L65:
  mov    %r13,%rsi
  xor    %edi,%edi
  call   <strtok@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L70
L86:
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <strncmp@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jne    L65
  lea    D48(%rip),%r12
  mov    %r15,%rdi
  mov    %r12,%rsi
  call   <strtok@plt>
  mov    %r12,%rsi
  xor    %edi,%edi
  call   <strtok@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L70
  mov    0xc(%rsp),%edx
  mov    (%rsp),%rdi
  call   <strncpy@plt>
  jmp    L96
L25:
  mov    %r12,%rsi
  lea    D22(%rip),%rdi
  mov    $0xffffffff,%r14d
  call   <log_msg@plt>
  jmp    L33
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D20
datatype: string
name: parse_data
arguments: data_label: D57
datatype: string
name: parse_data
arguments: data_label: D42
datatype: string
name: parse_data
arguments: data_label: D55
datatype: string
name: parse_data
arguments: data_label: D48
datatype: string
name: parse_data
arguments: data_label: D22
datatype: string

tool: D20: CMDLINE_PATH

tool: D57: r

tool: D42: /proc/cmdline

tool: D55:  ,

tool: D48: =

tool: D22: Could not open %s


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;
}
```