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

```asm
<fs_loadall>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  lea    D48(%rip),%rsi
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L13
  lea    0x30(%rsp),%r13
  mov    %rax,%rcx
  mov    $0x8,%edx
  mov    %rax,%rbp
  mov    $0x1,%esi
  mov    %r13,%rdi
  call   <fread@plt>
  cmp    $0x8,%eax
  jne    L176
  mov    $0x4,%edx
  lea    D1(%rip),%rsi
  mov    %r12,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  je     L146
  cmpb   $0x0,(%r12)
  jne    L74
L146:
  movsbl 0x37(%rsp),%edx
  movsbl 0x30(%rsp),%esi
  movsbl 0x35(%rsp),%r11d
  movsbl 0x34(%rsp),%r10d
  movsbl 0x32(%rsp),%ecx
  movsbl 0x31(%rsp),%ebx
  mov    %edx,%edi
  mov    %esi,0x8(%rsp)
  movsbl 0x33(%rsp),%r8d
  movsbl 0x36(%rsp),%eax
  mov    %r11d,0x2c(%rsp)
  mov    %r10d,0x28(%rsp)
  mov    %r8d,0x24(%rsp)
  mov    %ecx,0x20(%rsp)
  mov    %edx,0x1c(%rsp)
  mov    %ebx,0x4(%rsp)
  mov    %eax,(%rsp)
  call   <dispchar@plt>
  movsbl 0x36(%rsp),%edi
  mov    %eax,0xc(%rsp)
  call   <dispchar@plt>
  movsbl 0x35(%rsp),%edi
  mov    %eax,0x10(%rsp)
  call   <dispchar@plt>
  movsbl 0x34(%rsp),%edi
  mov    %eax,0x14(%rsp)
  call   <dispchar@plt>
  movsbl 0x33(%rsp),%edi
  mov    %eax,0x18(%rsp)
  call   <dispchar@plt>
  movsbl 0x32(%rsp),%edi
  mov    %eax,%ebx
  call   <dispchar@plt>
  movsbl 0x31(%rsp),%edi
  mov    %eax,%r15d
  call   <dispchar@plt>
  movsbl 0x30(%rsp),%edi
  mov    %eax,%r14d
  call   <dispchar@plt>
  sub    $0x8,%rsp
  lea    D97(%rip),%rdi
  mov    0x24(%rsp),%edx
  mov    %eax,%esi
  push   %rdx
  mov    0x10(%rsp),%ecx
  push   %rcx
  mov    0x44(%rsp),%r11d
  push   %r11
  mov    0x48(%rsp),%r10d
  push   %r10
  mov    0x4c(%rsp),%r8d
  push   %r8
  mov    0x50(%rsp),%ecx
  mov    %ebx,%r8d
  push   %rcx
  mov    0x3c(%rsp),%ecx
  push   %rcx
  mov    0x48(%rsp),%ecx
  push   %rcx
  mov    0x54(%rsp),%ecx
  push   %rcx
  mov    0x60(%rsp),%edx
  mov    %r15d,%ecx
  push   %rdx
  mov    0x6c(%rsp),%eax
  mov    %r14d,%edx
  push   %rax
  mov    0x78(%rsp),%r9d
  xor    %eax,%eax
  call   <printf@plt>
  add    $0x60,%rsp
L74:
  mov    $0x8,%edx
  lea    D74(%rip),%rsi
  mov    %r13,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  je     L32
  mov    $0x5,%edx
  lea    D23(%rip),%rsi
  mov    %r13,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L60
  movzbl 0x35(%rsp),%esi
  lea    -0x31(%rsi),%eax
  cmp    $0x8,%al
  ja     L60
  cmpb   $0x2e,0x36(%rsp)
  jne    L60
  movzbl 0x37(%rsp),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L60
  shl    $0x4,%esi
  add    %eax,%esi
  cmp    $0x16,%sil
  jg     L71
  cmpb   $0x0,(%r12)
  jne    L187
  mov    %rbp,%rdi
  call   <fs_load_pre17@plt>
  test   %rax,%rax
  js     L5
  mov    $0x10,%esi
  mov    %rbp,%rdi
  call   <chunk_load@plt>
  test   %rax,%rax
  js     L228
L66:
  mov    %rbp,%rdi
  call   <ferror@plt>
  test   %rax,%rax
  jne    L70
  mov    %rbp,%rdi
  call   <fclose@plt>
  xor    %eax,%eax
L194:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L107
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L32:
  lea    D61(%rip),%rdi
  call   <puts@plt>
  jmp    L66
  xchg   %ax,%ax
L71:
  movsbl %sil,%esi
  mov    %r12,%rdx
  mov    %rbp,%rdi
  call   <fs_load@plt>
  test   %rax,%rax
  jns    L66
  nopl   0x0(%rax)
L49:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L194
  nopw   0x0(%rax,%rax,1)
L60:
  lea    D119(%rip),%rdi
  call   <puts@plt>
  jmp    L49
  xchg   %ax,%ax
L176:
  lea    D30(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L194
L70:
  lea    D84(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L194
L13:
  lea    D99(%rip),%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L194
L187:
  lea    D70(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L194
L5:
  lea    D26(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L194
L228:
  lea    D98(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L194
L107:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D48
type_infered: string
name: parse_data
arguments: data_label: D1
type_infered: string
name: parse_data
arguments: data_label: D97
type_infered: string
name: parse_data
arguments: data_label: D74
type_infered: string
name: parse_data
arguments: data_label: D23
type_infered: string
name: parse_data
arguments: data_label: D61
type_infered: string
name: parse_data
arguments: data_label: D119
type_infered: string
name: parse_data
arguments: data_label: D30
type_infered: string
name: parse_data
arguments: data_label: D84
type_infered: string
name: parse_data
arguments: data_label: D99
type_infered: string
name: parse_data
arguments: data_label: D70
type_infered: string
name: parse_data
arguments: data_label: D26
type_infered: string
name: parse_data
arguments: data_label: D98
type_infered: string

tool: D48: r

tool: D1: HEAD

tool: D97: # header: %c%c%c%c%c%c%c%c (%02X%02X%02X%02X%02X%02X%02X%02X)


tool: D74: MFSM NEW

tool: D23: MFSM 

tool: D61: empty file

tool: D119: wrong metadata header (old version ?)

tool: D30: can't read metadata header

tool: D84: error reading metadata

tool: D99: can't open metadata file

tool: D70: old format detected - can't dump sections separatelly

tool: D26: error reading metadata (structure)

tool: D98: error reading metadata (chunks)

assistant: ```c
int fs_loadall(const char *fname, const char section[4]) {
  FILE *fd;
  uint8_t hdr[8];
  uint8_t fver;
  fd = fopen(fname, "r");
  if (fd == NULL) {
    printf("can't open metadata file\n");
    return -1;
  }
  if (fread(hdr, 1, 8, fd) != 8) {
    printf("can't read metadata header\n");
    fclose(fd);
    return -1;
  }
  if (memcmp(section, "HEAD", 4) == 0 || section[0] == 0) {
    printf("# header: %c%c%c%c%c%c%c%c (%02X%02X%02X%02X%02X%02X%02X%02X)\n", dispchar(hdr[0]), dispchar(hdr[1]), dispchar(hdr[2]), dispchar(hdr[3]), dispchar(hdr[4]), dispchar(hdr[5]), dispchar(hdr[6]), dispchar(hdr[7]), hdr[0], hdr[1], hdr[2], hdr[3], hdr[4], hdr[5], hdr[6], hdr[7]);
  }
  if (memcmp(hdr, "MFSM NEW", 8) == 0) {
    printf("empty file\n");
  } else if (memcmp(hdr,
                    "MFS"
                    "M ",
                    5) == 0 &&
             hdr[5] >= '1' && hdr[5] <= '9' && hdr[6] == '.' && hdr[7] >= '0' && hdr[7] <= '9') {
    fver = ((hdr[5] - '0') << 4) + (hdr[7] - '0');
    if (fver < 0x17) {
      if (section[0] != 0) {
        printf("old format detected - can't dump sections separatelly");
        fclose(fd);
        return -1;
      }
      if (fs_load_pre17(fd) < 0) {
        printf("error reading metadata (structure)\n");
        fclose(fd);
        return -1;
      }
      if (chunk_load(fd, 0x10) < 0) {
        printf("error reading metadata (chunks)\n");
        fclose(fd);
        return -1;
      }
    } else {
      if (fs_load(fd, fver, section) < 0) {
        fclose(fd);
        return -1;
      }
    }
  } else {
    printf("wrong metadata header (old version ?)\n");
    fclose(fd);
    return -1;
  }
  if (ferror(fd) != 0) {
    printf("error reading metadata\n");
    fclose(fd);
    return -1;
  }
  fclose(fd);
  return 0;
}
```