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

```asm
<read_conf>:
  endbr64
  push   %r13
  lea    D20(%rip),%rsi
  mov    %rdi,%r13
  push   %r12
  lea    D28(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x318,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x308(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L18
  nopl   0x0(%rax)
L127:
  mov    %rbp,%rdx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L83
  movzbl (%rsp),%eax
  cmp    $0x23,%al
  je     L127
  cmp    $0xa,%al
  je     L127
  cmp    $0x3a,%al
  je     L168
  lea    0x100(%rsp),%r8
  xor    %edx,%edx
  mov    %rbx,%rcx
  mov    %r8,%rsi
  nopl   0x0(%rax)
L135:
  add    $0x1,%rcx
  mov    %al,(%rsi)
  mov    %edx,%edi
  add    $0x1,%rsi
  movzbl (%rcx),%eax
  add    $0x1,%edx
  cmp    $0x3a,%al
  je     L242
  cmp    $0xa,%al
  jne    L135
L242:
  movslq %edx,%rdx
  movb   $0x0,0x100(%rsp,%rdx,1)
  cmp    $0x3a,%al
  je     L156
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <ErrMsg@plt>
  jmp    L127
  nopl   (%rax)
L168:
  movb   $0x0,0x100(%rsp)
  mov    $0xffffffff,%edi
  mov    %rbx,%rcx
  lea    0x100(%rsp),%r8
L156:
  movslq %edi,%rax
  movzbl 0x100(%rsp,%rax,1),%edx
  cmp    $0x9,%dl
  je     L50
  cmp    $0x20,%dl
  jne    L99
L50:
  add    %r8,%rax
  nopl   0x0(%rax,%rax,1)
L93:
  movzbl -0x1(%rax),%edx
  movb   $0x0,(%rax)
  sub    $0x1,%rax
  cmp    $0x20,%dl
  je     L93
  cmp    $0x9,%dl
  je     L93
L99:
  movzbl 0x1(%rcx),%eax
  lea    0x1(%rcx),%rsi
  cmp    $0x20,%al
  jne    L79
  nopl   0x0(%rax)
L229:
  movzbl 0x1(%rsi),%eax
  add    $0x1,%rsi
  cmp    $0x20,%al
  je     L229
L79:
  cmp    $0x9,%al
  je     L229
  cmp    $0x27,%al
  je     L52
  cmp    $0x22,%al
  je     L52
  lea    -0x9(%rax),%edx
  cmp    $0x1,%dl
  jbe    L15
L179:
  mov    $0x1,%edx
  lea    0x1ff(%rsp),%r10
  nopl   0x0(%rax)
L16:
  mov    %al,(%r10,%rdx,1)
  mov    %eax,%r9d
  movzbl (%rsi,%rdx,1),%eax
  lea    -0x1(%rdx),%edi
  mov    %edx,%r11d
  add    $0x1,%rdx
  lea    -0x9(%rax),%ecx
  cmp    $0x1,%cl
  ja     L16
  mov    %r9d,%eax
  and    $0xfffffffd,%eax
  cmp    $0x20,%al
  je     L77
  cmp    $0x27,%r9b
  cmovne %r11d,%edi
L77:
  movslq %edi,%rdi
  lea    0x200(%rsp),%rsi
  movb   $0x0,0x200(%rsp,%rdi,1)
  mov    %r8,%rdi
  call   <set_conf_para@plt>
  jmp    L127
  nopw   0x0(%rax,%rax,1)
L83:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x308(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L136
  add    $0x318,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L52:
  movzbl 0x1(%rsi),%eax
  add    $0x1,%rsi
  lea    -0x9(%rax),%edx
  cmp    $0x1,%dl
  ja     L179
L15:
  xor    %edi,%edi
  jmp    L77
L18:
  mov    0x308(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L136
  add    $0x318,%rsp
  mov    %r13,%rsi
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    10d0 <ErrMsg@plt>
L136:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D20
type: string
name: unpack_data
arguments: tag: D28
type: string
name: unpack_data
arguments: tag: D1
type: string

tool: D20: r

tool: D28: * Unknown conf line ...
%s

tool: D1: * Conf file '%s' does not exist.


assistant: ```c
void read_conf(char *cfile) {
  FILE *fp;
  char line[256], cpara[256], val[256], *c;
  int p;
  fp = fopen(cfile, "r");
  if (fp == NULL) {
    ErrMsg("* Conf file '%s' does not exist.\n", cfile);
    return;
  }
  while (fgets(line, 256, fp) != NULL) {
    if (line[0] == '#' || line[0] == '\n')
      continue;
    c = line;
    p = 0;
    while (*c != ':' && *c != '\n') {
      cpara[p++] = *(c++);
    }
    cpara[p] = '\0';
    if (*c != ':') {
      ErrMsg("* Unknown conf line ...\n%s");
      continue;
    }
    --p;
    while (cpara[p] == ' ' || cpara[p] == '\t') {
      cpara[p--] = '\0';
    }
    ++c;
    while (*c == ' ' || *c == '\t') {
      ++c;
    }
    if (*c == '\'' || *c == '"') {
      ++c;
    }
    p = 0;
    while (*c != '\t' && *c != '\n') {
      val[p++] = *(c++);
    }
    if (p >= 1) {
      if (val[p - 1] == ' ' || val[p - 1] == '\'' || val[p - 1] == '"') {
        --p;
      }
    }
    val[p] = '\0';
    set_conf_para(cpara, val);
  }
  fclose(fp);
}
```