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

```asm
<construitStructure>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x4c(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  mov    $0x1,%esi
  mov    $0x28,%edi
  call   <calloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x58(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <rewind@plt>
  mov    -0x60(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    $0x28,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  movl   $0x0,-0x2c(%rbp)
  jmp    L86
L34:
  mov    -0x60(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    $0x28,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <stringtoint@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x60(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    $0x28,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <stringtoint@plt>
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L63
L25:
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x60(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    $0x28,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <modifieLecture@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jne    L70
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L70:
  movl   $0x0,-0x24(%rbp)
  jmp    L17
L8:
  addl   $0x1,-0x24(%rbp)
L17:
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x24(%rbp)
  jge    L11
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L8
L11:
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x24(%rbp)
  jne    L12
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    -0x58(%rbp),%rdx
  mov    (%rdx),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x40(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x58(%rbp),%rdx
  mov    (%rdx),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x40(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %rax,(%rbx)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%edx
  add    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L65
L12:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%edx
  add    $0x1,%edx
  mov    %edx,(%rax)
L65:
  addl   $0x1,-0x28(%rbp)
L63:
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L25
  addl   $0x1,-0x2c(%rbp)
L86:
  mov    -0x2c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L34
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
L94:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int construitStructure(int *ligne, char **arret, int **mat, int nbLigne, int *nbArret, FILE *fichier) {
  char *temp_string;
  int temp_int = 0;
  int nbArretLigne = 0;
  int i = 0;
  int j = 0;
  int k = 0;
  temp_string = (char *)calloc(40, sizeof(char));
  *nbArret = 0;
  rewind(fichier);
  fgets(temp_string, 40, fichier);
  for (i = 0; i < nbLigne; i++) {
    fgets(temp_string, 40, fichier);
    temp_int = stringtoint(temp_string);
    ligne[i] = temp_int;
    fgets(temp_string, 40, fichier);
    nbArretLigne = stringtoint(temp_string);
    for (j = 0; j < nbArretLigne; j++) {
      strcpy(temp_string, "");
      fgets(temp_string, 40, fichier);
      modifieLecture(temp_string);
      if (strlen(temp_string) == 0) {
        free(temp_string);
        return -1;
      }
      k = 0;
      while ((k < *nbArret) && (strcmp(arret[k], temp_string) != 0)) {
        k = k + 1;
      }
      if (k == *nbArret) {
        arret[*nbArret] = (char *)calloc(strlen(temp_string) + 1, sizeof(char));
        arret[*nbArret] = strcpy(arret[*nbArret], temp_string);
        mat[i][*nbArret] = j + 1;
        *nbArret = *nbArret + 1;
      } else {
        mat[i][k] = j + 1;
      }
    }
  }
  free(temp_string);
  return 0;
}
```