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

```asm
<construitStructure>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%rbp
  mov    %rsi,0x10(%rsp)
  mov    %rdx,%r15
  mov    %ecx,%ebx
  mov    %r8,%r13
  mov    %r9,%r14
  mov    %r9,0x8(%rsp)
  mov    $0x1,%esi
  mov    $0x28,%edi
  call   <calloc@plt>
  mov    %rax,%r12
  movl   $0x0,0x0(%r13)
  mov    %r14,%rdi
  call   <rewind@plt>
  mov    %r14,%rdx
  mov    $0x28,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %ebx,%ebx
  jle    L40
  mov    %rbp,0x20(%rsp)
  lea    -0x1(%rbx),%eax
  lea    0x4(%rbp,%rax,4),%rax
  mov    %rax,0x28(%rsp)
L84:
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdx
  mov    $0x28,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  mov    %r12,%rdi
  call   <stringtoint@plt>
  mov    0x20(%rsp),%rdx
  mov    %eax,(%rdx)
  mov    %rbx,%rdx
  mov    $0x28,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  mov    %r12,%rdi
  call   <stringtoint@plt>
  mov    %eax,0x1c(%rsp)
  test   %eax,%eax
  jle    L126
  mov    $0x1,%r14d
  jmp    L66
L114:
  mov    %r12,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
L85:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L76:
  mov    $0x0,%ebx
L106:
  cmp    %ebx,0x0(%r13)
  je     L47
  movslq %ebx,%rbx
  mov    (%r15),%rax
  mov    %r14d,(%rax,%rbx,4)
L5:
  lea    0x1(%r14),%eax
  cmp    0x1c(%rsp),%r14d
  je     L126
  mov    %eax,%r14d
L66:
  movb   $0x0,(%r12)
  mov    0x8(%rsp),%rdx
  mov    $0x28,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  mov    %r12,%rdi
  call   <modifieLecture@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  je     L114
  cmpl   $0x0,0x0(%r13)
  jle    L76
  mov    0x10(%rsp),%rbp
  mov    $0x0,%ebx
L30:
  mov    %r12,%rsi
  mov    0x0(%rbp),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L106
  add    $0x1,%ebx
  add    $0x8,%rbp
  cmp    %ebx,0x0(%r13)
  jg     L30
  jmp    L106
L47:
  mov    %r12,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  mov    $0x1,%esi
  call   <calloc@plt>
  mov    %rax,%rdx
  movslq 0x0(%r13),%rax
  mov    0x10(%rsp),%rcx
  mov    %rdx,(%rcx,%rax,8)
  movslq 0x0(%r13),%rax
  lea    (%rcx,%rax,8),%rbx
  mov    %r12,%rsi
  mov    (%rbx),%rdi
  call   <strcpy@plt>
  mov    %rax,(%rbx)
  movslq 0x0(%r13),%rdx
  mov    (%r15),%rax
  mov    %r14d,(%rax,%rdx,4)
  addl   $0x1,0x0(%r13)
  jmp    L5
L126:
  addq   $0x4,0x20(%rsp)
  mov    0x20(%rsp),%rax
  add    $0x8,%r15
  cmp    0x28(%rsp),%rax
  jne    L84
L40:
  mov    %r12,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L85
```

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;
}
```