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

```asm
<parseconf>:
  endbr64
  push   %r14
  mov    %rdi,%r14
  mov    %rsi,%rdi
  lea    D0(%rip),%rsi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r13
  lea    0x8(%rsp),%rbx
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  call   <fopen@plt>
  mov    %rax,%r12
  nopl   0x0(%rax)
L157:
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <getline@plt>
  cmp    $0xffffffff,%eax
  je     L86
  mov    0x8(%rsp),%rdi
  movzbl (%rdi),%eax
  cmp    $0x23,%al
  je     L157
  cmp    $0xa,%al
  je     L157
  mov    %r14,%rsi
  call   <strstr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L157
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  call   <malloc@plt>
  mov    %rbp,%rdi
  mov    %rax,%r13
  call   <strlen@plt>
  xor    %esi,%esi
  mov    %r13,%rdi
  lea    0x1(%rax),%rdx
  call   <memset@plt>
  cmpb   $0x3d,0x0(%rbp)
  mov    $0x1,%eax
  je     L10
  nopl   0x0(%rax,%rax,1)
L101:
  mov    %eax,%ecx
  add    $0x1,%rax
  cmpb   $0x3d,-0x1(%rbp,%rax,1)
  jne    L101
  add    $0x1,%ecx
  movslq %ecx,%rax
L93:
  movzbl 0x0(%rbp,%rax,1),%eax
  mov    %eax,%edx
  and    $0xfffffffd,%edx
  cmp    $0x20,%dl
  jne    L97
  add    $0x1,%ecx
  movslq %ecx,%rdx
  nopl   0x0(%rax,%rax,1)
L127:
  movzbl 0x0(%rbp,%rdx,1),%eax
  mov    %edx,%ecx
  add    $0x1,%rdx
  mov    %eax,%esi
  and    $0xfffffffd,%esi
  cmp    $0x20,%sil
  je     L127
L97:
  test   %al,%al
  je     L134
  cmp    $0xa,%al
  je     L134
  movslq %ecx,%rcx
  mov    $0x1,%edx
  add    %rbp,%rcx
  nopl   0x0(%rax)
L6:
  mov    %al,-0x1(%r13,%rdx,1)
  movzbl (%rcx,%rdx,1),%eax
  movslq %edx,%rsi
  add    $0x1,%rdx
  test   %al,%al
  je     L138
  cmp    $0xa,%al
  jne    L6
L138:
  add    %r13,%rsi
L64:
  movb   $0x0,(%rsi)
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  jmp    L102
L86:
  mov    %r12,%rdi
  xor    %r13d,%r13d
  call   <fclose@plt>
L102:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0x20,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L10:
  mov    $0x1,%ecx
  jmp    L93
L134:
  mov    %r13,%rsi
  jmp    L64
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D0
data_type: string

tool: D0: r

assistant: ```c
char *parseconf(const char *variable, const char *filename) {
  FILE *fp;
  char *line = NULL;
  size_t len = 0;
  ssize_t read;
  char *var_temp = NULL;
  char *ret_val = NULL;
  int i, j;
  fp = fopen(filename, "r");
  while ((read = getline(&line, &len, fp)) != -1) {
    if (line[0] == '#' || line[0] == '\n')
      continue;
    var_temp = strstr(line, variable);
    if (var_temp != NULL) {
      ret_val = malloc(strlen(var_temp) + 1);
      memset(ret_val, 0, strlen(var_temp) + 1);
      for (i = 0; var_temp[i] != '='; i++)
        ;
      i++;
      while (var_temp[i] == ' ' || var_temp[i] == '"')
        i++;
      for (j = 0; var_temp[i] != '\0' && var_temp[i] != '\n'; i++, j++) {
        ret_val[j] = var_temp[i];
      }
      ret_val[j] = '\0';
      break;
    }
  }
  fclose(fp);
  if (var_temp != NULL) {
    free(var_temp);
    return (ret_val);
  } else
    return (NULL);
}
```