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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x2c(%rbp)
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x2c(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  imul   %edx,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  imul   %edx,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L106
L157:
  movl   $0x0,-0x24(%rbp)
  jmp    L58
L140:
  mov    -0x2c(%rbp),%eax
  imul   -0x28(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x24(%rbp)
L58:
  mov    -0x2c(%rbp),%eax
  cmp    %eax,-0x24(%rbp)
  jl     L140
  addl   $0x1,-0x28(%rbp)
L106:
  mov    -0x2c(%rbp),%eax
  cmp    %eax,-0x28(%rbp)
  jl     L157
  movl   $0x0,-0x28(%rbp)
  jmp    L103
L5:
  movl   $0x0,-0x24(%rbp)
  jmp    L105
L64:
  mov    -0x2c(%rbp),%eax
  imul   -0x28(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x24(%rbp)
L105:
  mov    -0x2c(%rbp),%eax
  cmp    %eax,-0x24(%rbp)
  jl     L64
  addl   $0x1,-0x28(%rbp)
L103:
  mov    -0x2c(%rbp),%eax
  cmp    %eax,-0x28(%rbp)
  jl     L5
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L134
L83:
  movl   $0x0,-0x24(%rbp)
  jmp    L114
L117:
  movl   $0x0,-0x20(%rbp)
  jmp    L86
L152:
  mov    -0x2c(%rbp),%eax
  imul   -0x28(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x20(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x24(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  add    %eax,-0x1c(%rbp)
  addl   $0x1,-0x20(%rbp)
L86:
  mov    -0x2c(%rbp),%eax
  cmp    %eax,-0x20(%rbp)
  jl     L152
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x24(%rbp)
  jne    L34
  mov    $0xa,%edi
  call   <putchar@plt>
L34:
  addl   $0x1,-0x24(%rbp)
L114:
  mov    -0x2c(%rbp),%eax
  cmp    %eax,-0x24(%rbp)
  jl     L117
  addl   $0x1,-0x28(%rbp)
L134:
  mov    -0x2c(%rbp),%eax
  cmp    %eax,-0x28(%rbp)
  jl     L83
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L72
  call   <__stack_chk_fail@plt>
L72:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D10
datatype: string
name: parse_data
arguments: data_tag: D21
datatype: string
name: parse_data
arguments: data_tag: D5
datatype: string

tool: D10: %i


tool: D21: %i

tool: D5: %i 

assistant: ```c
int main(int argc, char **argv) {
  int size = 0;
  int i, j, k;
  scanf("%i\n", &size);
  int *matice1 = (int *)malloc(size * size * sizeof(int));
  int *matice2 = (int *)malloc(size * size * sizeof(int));
  for (i = 0; i < size; i++) {
    for (j = 0; j < size; j++) {
      scanf("%i", &matice1[i * size + j]);
    }
  }
  for (i = 0; i < size; i++) {
    for (j = 0; j < size; j++) {
      scanf("%i", &matice2[i * size + j]);
    }
  }
  int sum = 0;
  for (i = 0; i < size; i++) {
    for (j = 0; j < size; j++) {
      for (k = 0; k < size; k++) {
        sum += matice1[i * size + k] * matice2[k * size + j];
      }
      printf("%i ", sum);
      sum = 0;
      if (j == k - 1)
        printf("\n");
    }
  }
  free(matice1);
  free(matice2);
  return 0;
}
```