user: Converte this assembly snippet into its equivalent C code:

```asm
<get_conf_value>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  sete   %al
  test   %rdx,%rdx
  sete   %dl
  or     %dl,%al
  jne    L28
  test   %rdi,%rdi
  je     L28
  mov    %rsi,%r13
  lea    D6(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L21
  lea    0x18(%rsp),%rax
  lea    0x20(%rsp),%r15
  mov    %rax,0x8(%rsp)
L51:
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rdx
  mov    %r15,%rsi
  call   <getline@plt>
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  je     L53
  mov    0x18(%rsp),%r14
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L51
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    0x20(%rsp),%rdx
  cmpb   $0x3d,(%r14,%rax,1)
  mov    %rax,%r12
  jne    L12
  add    $0x1,%rdx
  lea    0x1(%r14,%rax,1),%rsi
  mov    %rbx,%rdi
  sub    %rax,%rdx
  call   <strncpy@plt>
  mov    0x20(%rsp),%rdx
  mov    %r12,%rsi
  xor    %eax,%eax
  lea    D50(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rbx,%rsi
  lea    D1(%rip),%rdi
  mov    %rax,%rdx
  mov    %rax,%r12
  xor    %eax,%eax
  call   <printf@plt>
  movb   $0x0,-0x1(%rbx,%r12,1)
  mov    0x18(%rsp),%rdi
  xor    %r12d,%r12d
  call   <free@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
L39:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L88
  add    $0x38,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L53:
  mov    %r13,%rsi
  lea    D61(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  jmp    L39
  nopl   0x0(%rax,%rax,1)
L12:
  mov    %rax,%rsi
  lea    D50(%rip),%rdi
  xor    %eax,%eax
  mov    $0xfffffffe,%r12d
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  jmp    L39
  nopl   0x0(%rax)
L28:
  lea    D13(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <puts@plt>
  jmp    L39
L21:
  lea    D67(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <puts@plt>
  jmp    L39
L88:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D6
data_type: string
name: parse_data
arguments: data_tag: D50
data_type: string
name: parse_data
arguments: data_tag: D1
data_type: string
name: parse_data
arguments: data_tag: D61
data_type: string
name: parse_data
arguments: data_tag: D13
data_type: string
name: parse_data
arguments: data_tag: D67
data_type: string

tool: D6: r

tool: D50: config file format is invaild tlen is %d len is %d


tool: D1: get value is %s tlen is %d


tool: D61: key: %s is not in config file!


tool: D13: paramer is invaild!

tool: D67: open config file is error!

assistant: ```c
int get_conf_value(char *file_path, char *key_name, char *value) {
  FILE *fp = NULL;
  char *line = NULL, *substr = NULL;
  size_t len = 0, tlen = 0;
  ssize_t read = 0;
  if (file_path == NULL || key_name == NULL || value == NULL) {
    printf("paramer is invaild!\n");
    return -1;
  }
  fp = fopen(file_path, "r");
  if (fp == NULL) {
    printf("open config file is error!\n");
    return -1;
  }
  while ((read = getline(&line, &len, fp)) != -1) {
    substr = strstr(line, key_name);
    if (substr == NULL) {
      continue;
    } else {
      tlen = strlen(key_name);
      if (line[tlen] == '=') {
        strncpy(value, &line[tlen + 1], len - tlen + 1);
        printf("config file format is invaild tlen is %d len is %d\n", tlen, len);
        tlen = strlen(value);
        printf("get value is %s tlen is %d\n", value, tlen);
        *(value + tlen - 1) = '\0';
        break;
      } else {
        printf("config file format is invaild tlen is %d len is %d\n", tlen, len);
        fclose(fp);
        return -2;
      }
    }
  }
  if (substr == NULL) {
    printf("key: %s is not in config file!\n", key_name);
    fclose(fp);
    return -1;
  }
  free(line);
  fclose(fp);
  return 0;
}
```