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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D9(%rip),%r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%r14
  call   <adainit@plt>
  lea    D19(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x48(%rbp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  lea    D7(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x44(%rbp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  lea    D45(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x40(%rbp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  movslq -0x40(%rbp),%rax
  mov    %rsp,%rcx
  mov    %rax,%r8
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L102
L109:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L109
L102:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L76
L98:
  mov    %rsp,%rbx
  mov    %rbx,-0x58(%rbp)
  test   %r8d,%r8d
  jle    L74
  xor    %r15d,%r15d
  lea    D33(%rip),%r13
  nopl   (%rax)
L72:
  mov    %r15d,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  add    $0x4,%rbx
  call   <scanf@plt>
  mov    -0x40(%rbp),%r8d
  cmp    %r15d,%r8d
  jg     L72
L74:
  mov    -0x58(%rbp),%rcx
  mov    -0x44(%rbp),%esi
  mov    %r8d,%edx
  lea    -0x3c(%rbp),%r12
  mov    -0x48(%rbp),%edi
  call   <sweep_define_parameters_numerically@plt>
  mov    %r12,%rdi
  mov    %r14,%rsp
  call   <sweep_get_number_of_equations@plt>
  mov    -0x3c(%rbp),%esi
  lea    D86(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <sweep_get_number_of_variables@plt>
  mov    -0x3c(%rbp),%esi
  lea    D73(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <sweep_get_number_of_parameters@plt>
  mov    -0x3c(%rbp),%esi
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movslq -0x40(%rbp),%rax
  mov    %rsp,%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L99
L2:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L2
L99:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L123
L112:
  mov    %rsp,%r15
  mov    %r15,%rdi
  call   <sweep_get_indices_numerically@plt>
  lea    D35(%rip),%rdi
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <printf@plt>
  cmpl   $0x0,-0x40(%rbp)
  jle    L105
  xor    %ebx,%ebx
  lea    D49(%rip),%r12
  nopl   0x0(%rax,%rax,1)
L110:
  mov    (%r15,%rbx,4),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,-0x40(%rbp)
  jg     L110
L105:
  mov    $0xa,%edi
  call   <putchar@plt>
  xor    %eax,%eax
  mov    %r14,%rsp
  call   <adafinal@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L84
  lea    -0x28(%rbp),%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L123:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L112
L76:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L98
L84:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D9
type_infered: string
name: unpack_data
arguments: tag: D19
type_infered: string
name: unpack_data
arguments: tag: D7
type_infered: string
name: unpack_data
arguments: tag: D45
type_infered: string
name: unpack_data
arguments: tag: D33
type_infered: string
name: unpack_data
arguments: tag: D86
type_infered: string
name: unpack_data
arguments: tag: D73
type_infered: string
name: unpack_data
arguments: tag: D40
type_infered: string
name: unpack_data
arguments: tag: D35
type_infered: string
name: unpack_data
arguments: tag: D49
type_infered: string

tool: D9: %d

tool: D19: Give the number of equations : 

tool: D7: Give the number of variables : 

tool: D45: Give the number of parameters : 

tool: D33: Give the index of parameter %d : 

tool: D86: The number of equations : %d.


tool: D73: The number of variables : %d.


tool: D40: The number of parameters : %d.


tool: D35: THe indices of the parameters :

tool: D49:  %d

assistant: ```c
int main(int argc, char *argv[]) {
  int fail, nbequ, nbvar, nbpar, nbr;
  adainit();
  printf("Give the number of equations : ");
  scanf("%d", &nbequ);
  printf("Give the number of variables : ");
  scanf("%d", &nbvar);
  printf("Give the number of parameters : ");
  scanf("%d", &nbpar);
  {
    int pars[nbpar], k;
    for (k = 0; k < nbpar; k++) {
      printf("Give the index of parameter %d : ", k);
      scanf("%d", &pars[k]);
    }
    sweep_define_parameters_numerically(nbequ, nbvar, nbpar, pars);
  }
  fail = sweep_get_number_of_equations(&nbr);
  printf("The number of equations : %d.\n", nbr);
  fail = sweep_get_number_of_variables(&nbr);
  printf("The number of variables : %d.\n", nbr);
  fail = sweep_get_number_of_parameters(&nbr);
  printf("The number of parameters : %d.\n", nbr);
  {
    int idxpars[nbpar], k;
    fail = sweep_get_indices_numerically(idxpars);
    printf("THe indices of the parameters :");
    for (k = 0; k < nbpar; k++)
      printf(" %d", idxpars[k]);
    printf("\n");
  }
  adafinal();
  return fail;
}
```