user: Translate the below assembly code into C programming language:

```asm
<get_cmd_line_value>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x460,%rsp
  mov    %rdi,-0x448(%rbp)
  mov    %esi,-0x44c(%rbp)
  mov    %rdx,-0x458(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0xffffffff,-0x438(%rbp)
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x428(%rbp)
  cmpq   $0x0,-0x428(%rbp)
  je     L99
  mov    -0x428(%rbp),%rax
  jmp    L104
L99:
  lea    D45(%rip),%rax
L104:
  mov    %rax,-0x428(%rbp)
  mov    -0x428(%rbp),%rax
  lea    D56(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x420(%rbp)
  cmpq   $0x0,-0x420(%rbp)
  jne    L87
  mov    -0x428(%rbp),%rax
  mov    %rax,%rsi
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  call   <log_msg@plt>
  mov    $0xffffffff,%eax
  jmp    L53
L87:
  mov    -0x420(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L62
  lea    -0x410(%rbp),%rax
  lea    D30(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x430(%rbp)
  mov    -0x458(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x434(%rbp)
  jmp    L38
L80:
  mov    -0x434(%rbp),%edx
  mov    -0x458(%rbp),%rcx
  mov    -0x430(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L81
  mov    -0x430(%rbp),%rax
  lea    D59(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x418(%rbp)
  lea    D59(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x418(%rbp)
  cmpq   $0x0,-0x418(%rbp)
  je     L44
  mov    -0x44c(%rbp),%edx
  mov    -0x418(%rbp),%rcx
  mov    -0x448(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movl   $0x0,-0x438(%rbp)
  jmp    L44
L81:
  lea    D30(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x430(%rbp)
L38:
  cmpq   $0x0,-0x430(%rbp)
  jne    L80
  jmp    L62
L44:
  nop
L62:
  mov    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x438(%rbp),%eax
L53:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L14
  call   <__stack_chk_fail@plt>
L14:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D47
data_type: string
name: parse_data
arguments: label: D45
data_type: string
name: parse_data
arguments: label: D56
data_type: string
name: parse_data
arguments: label: D50
data_type: string
name: parse_data
arguments: label: D30
data_type: string
name: parse_data
arguments: label: D59
data_type: string

tool: D47: CMDLINE_PATH

tool: D45: /proc/cmdline

tool: D56: r

tool: D50: Could not open %s


tool: D30:  ,

tool: D59: =

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