user: Please show me the C implementation that matches the assembly code listed below:

```asm
<parseconf>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r13
  mov    %rsi,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  lea    D8(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%rbp
  lea    0x10(%rsp),%r12
L40:
  lea    0x8(%rsp),%rdi
  mov    %rbp,%rdx
  mov    %r12,%rsi
  call   <getline@plt>
  cmp    $0xffffffff,%eax
  je     L17
  mov    0x8(%rsp),%rdi
  movzbl (%rdi),%eax
  cmp    $0x23,%al
  je     L40
  cmp    $0xa,%al
  je     L40
  mov    %r13,%rsi
  call   <strstr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L40
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%rdx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  cmpb   $0x3d,(%rbx)
  je     L109
  mov    $0x1,%edx
L64:
  mov    %edx,%eax
  add    $0x1,%rdx
  cmpb   $0x3d,-0x1(%rbx,%rdx,1)
  jne    L64
L21:
  lea    0x1(%rax),%ecx
  movslq %ecx,%rdx
  movzbl (%rbx,%rdx,1),%edx
  and    $0xfffffffd,%edx
  cmp    $0x20,%dl
  jne    L153
  add    $0x2,%eax
  cltq
L20:
  mov    %eax,%ecx
  movzbl (%rbx,%rax,1),%edx
  and    $0xfffffffd,%edx
  add    $0x1,%rax
  cmp    $0x20,%dl
  je     L20
L153:
  movslq %ecx,%rcx
  add    %rbx,%rcx
  movzbl (%rcx),%edx
  test   %dl,%dl
  je     L46
  cmp    $0xa,%dl
  je     L46
  mov    $0x1,%eax
L92:
  mov    %dl,-0x1(%r12,%rax,1)
  mov    %eax,%esi
  movzbl (%rcx,%rax,1),%edx
  add    $0x1,%rax
  test   %dl,%dl
  je     L134
  cmp    $0xa,%dl
  jne    L92
L134:
  movslq %esi,%rsi
  movb   $0x0,(%r12,%rsi,1)
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %rbx,%rdi
  call   <free@plt>
L158:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  mov    %r12,%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L109:
  mov    $0x0,%eax
  jmp    L21
L46:
  mov    $0x0,%esi
  jmp    L134
L17:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0x0,%r12d
  jmp    L158
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D8
data_type: string

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