user: What is the c source code of the assembly code below:

```asm
<cpu_map__read_all_cpu_map>:
  endbr64
  push   %r15
  lea    D26(%rip),%rsi
  lea    D5(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L116
  mov    %rax,%rbp
  lea    0x14(%rsp),%rax
  movb   $0x0,0x13(%rsp)
  xor    %ebx,%ebx
  mov    %rax,(%rsp)
  mov    $0xffffffff,%r13d
  xor    %r12d,%r12d
  xor    %r15d,%r15d
  lea    0x13(%rsp),%r14
  nopw   0x0(%rax,%rax,1)
L108:
  mov    (%rsp),%rdx
  mov    %r14,%rcx
  lea    D7(%rip),%rsi
  mov    %rbp,%rdi
  call   <fscanf@plt>
  mov    %eax,%ecx
  test   %eax,%eax
  jle    L132
  test   %r13d,%r13d
  js     L118
  mov    0x14(%rsp),%esi
  lea    (%rsi,%r15,1),%eax
  sub    %r13d,%eax
  cmp    %ebx,%eax
  jg     L198
L4:
  lea    0x1(%r15),%eax
  lea    0x1(%r13),%edx
  cltq
  cmp    %esi,%edx
  jge    L118
  xchg   %ax,%ax
L201:
  mov    %edx,-0x4(%r12,%rax,4)
  movslq %eax,%r15
  add    $0x1,%edx
  add    $0x1,%rax
  cmp    %edx,0x14(%rsp)
  jg     L201
L118:
  cmp    %ebx,%r15d
  je     L214
L172:
  mov    0x14(%rsp),%r13d
  lea    0x1(%r15),%edi
  mov    %r13d,(%r12,%r15,4)
  cmp    $0x2,%ecx
  je     L160
  cmp    $0x1,%ecx
  je     L26
  movzbl 0x13(%rsp),%eax
  cmp    $0xa,%al
  je     L26
L25:
  mov    $0xffffffff,%r13d
L23:
  movslq %edi,%r15
  jmp    L108
  nopl   0x0(%rax)
L160:
  movzbl 0x13(%rsp),%eax
  cmp    $0x2d,%al
  je     L23
  cmp    $0xa,%al
  jne    L25
L26:
  mov    %r12,%rsi
  call   <cpu_map__trim_new@plt>
  mov    %rax,%r10
L213:
  mov    %r12,%rdi
  mov    %r10,(%rsp)
  call   <free@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    (%rsp),%r10
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L127
  add    $0x28,%rsp
  mov    %r10,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L214:
  lea    0x100(%r15),%ebx
  mov    %r12,%rdi
  mov    %ecx,0xc(%rsp)
  lea    0x0(,%rbx,4),%esi
  call   <realloc@plt>
  mov    %rax,%r10
  test   %rax,%rax
  je     L213
  mov    0xc(%rsp),%ecx
  mov    %rax,%r12
  jmp    L172
  xchg   %ax,%ax
L198:
  lea    0x7f(%rax),%ebx
  mov    %r12,%rdi
  mov    %ecx,0xc(%rsp)
  lea    0x0(,%rbx,4),%esi
  call   <realloc@plt>
  mov    %rax,%r10
  test   %rax,%rax
  je     L213
  mov    0x14(%rsp),%esi
  mov    0xc(%rsp),%ecx
  mov    %rax,%r12
  jmp    L4
L132:
  test   %r15d,%r15d
  jne    L210
  xor    %eax,%eax
  call   <cpu_map__default_new@plt>
  mov    %rax,%r10
  jmp    L213
L116:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L127
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1110 <cpu_map__default_new@plt>
L210:
  mov    %r15d,%edi
  jmp    L26
L127:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D26
type: string
name: parse_data
arguments: label: D5
type: string
name: parse_data
arguments: label: D7
type: string

tool: D26: r

tool: D5: /sys/devices/system/cpu/online

tool: D7: %u%c

assistant: ```c
struct cpu_map *cpu_map__read_all_cpu_map(void) {
  struct cpu_map *cpus = NULL;
  FILE *onlnf;
  int nr_cpus = 0;
  int *tmp_cpus = NULL, *tmp;
  int max_entries = 0;
  int n, cpu, prev;
  char sep;
  onlnf = fopen("/sys/devices/system/cpu/online", "r");
  if (!onlnf)
    return cpu_map__default_new();
  sep = 0;
  prev = -1;
  for (;;) {
    n = fscanf(onlnf, "%u%c", &cpu, &sep);
    if (n <= 0)
      break;
    if (prev >= 0) {
      int new_max = nr_cpus + cpu - prev - 1;
      if (new_max >= max_entries) {
        max_entries = new_max + 256 / 2;
        tmp = realloc(tmp_cpus, max_entries * sizeof(int));
        if (tmp == NULL)
          goto out_free_tmp;
        tmp_cpus = tmp;
      }
      while (++prev < cpu)
        tmp_cpus[nr_cpus++] = prev;
    }
    if (nr_cpus == max_entries) {
      max_entries += 256;
      tmp = realloc(tmp_cpus, max_entries * sizeof(int));
      if (tmp == NULL)
        goto out_free_tmp;
      tmp_cpus = tmp;
    }
    tmp_cpus[nr_cpus++] = cpu;
    if (n == 2 && sep == '-')
      prev = cpu;
    else
      prev = -1;
    if (n == 1 || sep == '\n')
      break;
  }
  if (nr_cpus > 0)
    cpus = cpu_map__trim_new(nr_cpus, tmp_cpus);
  else
    cpus = cpu_map__default_new();
out_free_tmp:
  free(tmp_cpus);
  fclose(onlnf);
  return cpus;
}
```