user: What is the c source code of the assembly code 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    D18(%rip),%rdi
  mov    %esi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  call   <getenv@plt>
  lea    D21(%rip),%rsi
  test   %rax,%rax
  mov    %rax,%r12
  lea    D58(%rip),%rax
  cmove  %rax,%r12
  mov    %r12,%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L23
  lea    0x10(%rsp),%r12
  mov    %rax,%rdx
  mov    $0x400,%esi
  mov    %rax,%rbp
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L68
L84:
  mov    $0xffffffff,%r14d
L59:
  mov    %rbp,%rdi
  call   <fclose@plt>
L96:
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L51
  add    $0x428,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L68:
  lea    D32(%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    L52
  jmp    L84
  nopw   0x0(%rax,%rax,1)
L32:
  mov    %r13,%rsi
  xor    %edi,%edi
  call   <strtok@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L84
L52:
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <strncmp@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jne    L32
  lea    D8(%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     L84
  mov    0xc(%rsp),%edx
  mov    (%rsp),%rdi
  call   <strncpy@plt>
  jmp    L59
L23:
  mov    %r12,%rsi
  lea    D11(%rip),%rdi
  mov    $0xffffffff,%r14d
  call   <log_msg@plt>
  jmp    L96
L51:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D18
type: string
name: unpack_data
arguments: label: D21
type: string
name: unpack_data
arguments: label: D58
type: string
name: unpack_data
arguments: label: D32
type: string
name: unpack_data
arguments: label: D8
type: string
name: unpack_data
arguments: label: D11
type: string

tool: D18: CMDLINE_PATH

tool: D21: r

tool: D58: /proc/cmdline

tool: D32:  ,

tool: D8: =

tool: D11: 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;
}
```