user: Converte this assembly snippet into its equivalent C code:

```asm
<read_data_system>:
  endbr64
  push   %rbp
  mov    %edx,%eax
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,-0x44(%rbp)
  imul   %eax,%edi
  add    %eax,%eax
  mov    %rcx,-0x58(%rbp)
  mov    %rsp,%rcx
  mov    %esi,-0x7c(%rbp)
  mov    %fs:0x28,%rdx
  mov    %rdx,-0x38(%rbp)
  xor    %edx,%edx
  mov    %eax,-0x60(%rbp)
  movslq %edi,%rax
  lea    0xf(,%rax,4),%rdx
  mov    %edi,-0x80(%rbp)
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rdx
  sub    %rdx,%rcx
  and    $0xfffffffffffffff0,%rax
  cmp    %rcx,%rsp
  je     L5
L85:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L85
L5:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L37
L56:
  movslq -0x60(%rbp),%rax
  mov    %rsp,%rdx
  mov    %rsp,-0x68(%rbp)
  shl    $0x3,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  cmp    %rdx,%rsp
  je     L98
L18:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L18
L98:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L35
L28:
  mov    -0x7c(%rbp),%eax
  mov    %rsp,-0x78(%rbp)
  test   %eax,%eax
  jle    L24
  add    $0x1,%eax
  movq   $0x1,-0x50(%rbp)
  lea    D9(%rip),%r12
  mov    %rax,-0x70(%rbp)
  movl   $0x0,-0x5c(%rbp)
  movl   $0x0,-0x48(%rbp)
  nop
L78:
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x50(%rbp),%rbx
  lea    D38(%rip),%rdi
  xor    %eax,%eax
  mov    %ebx,%esi
  call   <printf@plt>
  mov    -0x58(%rbp),%rax
  mov    -0x4(%rax,%rbx,4),%ecx
  test   %ecx,%ecx
  jle    L57
  movslq -0x5c(%rbp),%rax
  mov    -0x78(%rbp),%rcx
  xor    %r13d,%r13d
  lea    (%rcx,%rax,8),%r14
  nopl   0x0(%rax)
L147:
  add    $0x1,%r13d
  lea    D27(%rip),%rdi
  xor    %eax,%eax
  mov    %r13d,%esi
  call   <printf@plt>
  mov    -0x44(%rbp),%eax
  test   %eax,%eax
  jle    L142
  movslq -0x48(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  sub    $0x1,%eax
  add    %rcx,%rax
  lea    (%rdx,%rcx,4),%r15
  lea    0x4(%rdx,%rax,4),%rbx
  nopl   0x0(%rax,%rax,1)
L4:
  mov    %r15,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x4,%r15
  call   <scanf@plt>
  cmp    %r15,%rbx
  jne    L4
  mov    -0x44(%rbp),%edx
  add    %edx,-0x48(%rbp)
L142:
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rsi
  lea    D67(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    0x8(%r14),%rsi
  xor    %eax,%eax
  addl   $0x2,-0x5c(%rbp)
  lea    D67(%rip),%rdi
  add    $0x10,%r14
  call   <scanf@plt>
  mov    -0x58(%rbp),%rax
  mov    -0x50(%rbp),%rcx
  cmp    -0x4(%rax,%rcx,4),%r13d
  jl     L147
L57:
  addq   $0x1,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  cmp    -0x70(%rbp),%rax
  jne    L78
L24:
  xor    %eax,%eax
  call   <adainit@plt>
  sub    $0x8,%rsp
  push   -0x78(%rbp)
  mov    -0x58(%rbp),%rdx
  mov    -0x60(%rbp),%r9d
  mov    -0x68(%rbp),%r8
  mov    -0x80(%rbp),%ecx
  mov    -0x7c(%rbp),%esi
  mov    -0x44(%rbp),%edi
  call   <_ada_phc_solver@plt>
  xor    %eax,%eax
  call   <adafinal@plt>
  pop    %rax
  pop    %rdx
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L120
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L37:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L56
L35:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L28
L120:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D9
data_type: string
name: unpack_data
arguments: tag: D1
data_type: string
name: unpack_data
arguments: tag: D38
data_type: string
name: unpack_data
arguments: tag: D27
data_type: string
name: unpack_data
arguments: tag: D37
data_type: string
name: unpack_data
arguments: tag: D67
data_type: string

tool: D9: %d

tool: D1: Reading the support and coefficients

tool: D38:  of polynomial %d ...


tool: D27:   give exponents of monomial %d : 

tool: D37:   give two doubles : 

tool: D67: %lf

assistant: ```c
void read_data_system(int n, int m, int monsum, int moncnt[m]) {
  int dimsup = n * monsum;
  int dimcff = 2 * monsum;
  int sup[dimsup];
  double cff[dimcff];
  int i, j, k, indsup, indcff;
  indsup = 0;
  indcff = 0;
  for (i = 0; i < m; i++) {
    printf("Reading the support and coefficients");
    printf(" of polynomial %d ...\n", i + 1);
    for (j = 0; j < moncnt[i]; j++) {
      printf("  give exponents of monomial %d : ", j + 1);
      for (k = 0; k < n; k++)
        scanf("%d", &sup[indsup++]);
      printf("  give two doubles : ");
      scanf("%lf", &cff[indcff++]);
      scanf("%lf", &cff[indcff++]);
    }
  }
  adainit();
  _ada_phc_solver(n, m, moncnt, dimsup, sup, dimcff, cff);
  adafinal();
}
```