user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<charmap_parse>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x428,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  lea    D28(%rip),%rsi
  call   <fopen@plt>
  test   %rax,%rax
  je     L12
  mov    %rax,%rbp
  mov    $0x0,%ebx
  lea    D48(%rip),%r14
  lea    D26(%rip),%r15
  jmp    L198
L179:
  mov    %r15,%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <maperr@plt>
L198:
  lea    0x10(%rsp),%rdi
  mov    %rbp,%rdx
  mov    $0x3ff,%esi
  call   <fgets@plt>
  test   %rax,%rax
  je     L191
  add    $0x1,%ebx
  cmpb   $0x23,0x10(%rsp)
  je     L198
  movl   $0x0,0xc(%rsp)
  lea    0xa(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  call   <get_key@plt>
  test   %rax,%rax
  je     L179
  mov    0xc(%rsp),%eax
  movslq %eax,%rdx
  cmpb   $0x2d,0x10(%rsp,%rdx,1)
  je     L142
  movzbl 0xa(%rsp),%eax
  mov    %al,0xb(%rsp)
L176:
  lea    0xc(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  call   <eat_ws@plt>
  mov    0xc(%rsp),%eax
  movslq %eax,%rdx
  cmpb   $0x3d,0x10(%rsp,%rdx,1)
  je     L63
  mov    %r14,%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <maperr@plt>
  jmp    L198
L142:
  add    $0x1,%eax
  mov    %eax,0xc(%rsp)
  lea    0xb(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  call   <get_key@plt>
  test   %rax,%rax
  je     L65
  movzbl 0xa(%rsp),%eax
  cmp    %al,0xb(%rsp)
  jae    L176
  lea    D5(%rip),%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <maperr@plt>
  jmp    L198
L65:
  lea    D37(%rip),%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <maperr@plt>
  jmp    L198
L63:
  add    $0x1,%eax
  mov    %eax,0xc(%rsp)
  lea    0xc(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  call   <eat_ws@plt>
  mov    0xc(%rsp),%eax
  movslq %eax,%rdx
  movzbl 0x10(%rsp,%rdx,1),%edx
  test   %dl,%dl
  je     L3
  cmp    $0xa,%dl
  je     L3
  cltq
  lea    0x10(%rsp,%rax,1),%rdi
  call   <get_value@plt>
  movzbl 0xa(%rsp),%ecx
  movzbl 0xb(%rsp),%edi
  cmp    %dil,%cl
  ja     L198
  mov    %ecx,%edx
  sub    %ecx,%eax
L117:
  movzbl %dl,%ecx
  lea    (%rax,%rdx,1),%esi
  mov    %sil,(%r12,%rcx,1)
  add    $0x1,%edx
  cmp    %dil,%dl
  jbe    L117
  jmp    L198
L3:
  lea    D15(%rip),%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <maperr@plt>
  mov    $0x0,%eax
  jmp    L52
L191:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0x1,%eax
L52:
  mov    0x418(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L131
  add    $0x428,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L12:
  mov    $0x0,%eax
  jmp    L52
L131:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D28
type: string
name: disassemble_data
arguments: data_label: D48
type: string
name: disassemble_data
arguments: data_label: D26
type: string
name: disassemble_data
arguments: data_label: D5
type: string
name: disassemble_data
arguments: data_label: D37
type: string
name: disassemble_data
arguments: data_label: D15
type: string

tool: D28: rt

tool: D48: `=' expected

tool: D26: key expected

tool: D5: invalid range

tool: D37: high limit key expected

tool: D15: value expected

assistant: ```c
int charmap_parse(const char *filename, unsigned char *map) {
  int lineno;
  FILE *fp;
  char line[1024];
  fp = fopen(filename, "rt");
  if (fp == NULL) {
    return 0;
  }
  lineno = 0;
  while (fgets(line, 1023, fp) != NULL) {
    unsigned char key;
    unsigned char hkey;
    unsigned char value;
    int i;
    lineno++;
    if (line[0] == '#')
      continue;
    i = 0;
    if (get_key(line, &i, &key) == 0) {
      maperr(filename, lineno, "key expected");
      continue;
    }
    if (line[i] == '-') {
      i++;
      if (get_key(line, &i, &hkey) == 0) {
        maperr(filename, lineno, "high limit key expected");
        continue;
      }
      if (hkey < key) {
        maperr(filename, lineno, "invalid range");
        continue;
      }
    } else {
      hkey = key;
    }
    eat_ws(line, &i);
    if (line[i] != '=') {
      maperr(filename, lineno, "`=' expected");
      continue;
    }
    i++;
    eat_ws(line, &i);
    if ((line[i] == '\0') || (line[i] == '\n')) {
      maperr(filename, lineno, "value expected");
      return 0;
    }
    value = get_value(&line[i]);
    for (; key <= hkey; key++) {
      map[key] = value++;
    }
  }
  fclose(fp);
  return 1;
}
```