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

```asm
<transponate_matrix>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movl   $0xfffff800,0x4(%rsp)
  lea    0x4(%rsp),%rsi
  lea    D28(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  cmp    $0xfffff800,%eax
  je     L63
  movslq %eax,%rdi
  mov    $0x8,%esi
  call   <calloc@plt>
  mov    %rax,%rbp
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <assert@plt>
  mov    0x4(%rsp),%edi
  test   %edi,%edi
  jle    L56
  mov    $0x0,%ebx
L71:
  movslq %edi,%rdi
  mov    $0x8,%esi
  call   <calloc@plt>
  mov    %rax,%rdi
  mov    %rax,0x0(%rbp,%rbx,8)
  mov    $0x0,%eax
  call   <assert@plt>
  mov    0x4(%rsp),%edi
  add    $0x1,%rbx
  cmp    %ebx,%edi
  jg     L71
  test   %edi,%edi
  jle    L56
  mov    %rbp,%r12
  mov    %rbp,%r13
  mov    $0x0,%r15d
  lea    D29(%rip),%r14
  jmp    L119
L112:
  mov    0x0(%r13),%rax
  lea    (%rax,%rbx,8),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x1,%rbx
  cmp    %ebx,0x4(%rsp)
  jg     L112
L12:
  add    $0x1,%r15d
  mov    0x4(%rsp),%eax
  add    $0x8,%r13
  cmp    %r15d,%eax
  jle    L102
L119:
  mov    $0x0,%ebx
  cmpl   $0x0,0x4(%rsp)
  jg     L112
  jmp    L12
L102:
  test   %eax,%eax
  jle    L56
  mov    %rbp,%r8
  mov    $0x0,%ecx
  mov    $0x1,%r9d
L32:
  cmp    %r9d,0x4(%rsp)
  jle    L154
  mov    %r9,%rax
L122:
  mov    (%r8),%rdx
  lea    (%rdx,%rax,8),%rdx
  mov    (%rdx),%rsi
  mov    0x0(%rbp,%rax,8),%rdi
  mov    (%rdi,%rcx,1),%rdi
  mov    %rdi,(%rdx)
  mov    0x0(%rbp,%rax,8),%rdx
  mov    %rsi,(%rdx,%rcx,1)
  mov    0x4(%rsp),%edx
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L122
  add    $0x1,%r9
  add    $0x8,%r8
  add    $0x8,%rcx
  lea    -0x1(%r9),%eax
  cmp    %eax,%edx
  jg     L32
L154:
  cmpl   $0x0,0x4(%rsp)
  jle    L56
  mov    $0x0,%r14d
  lea    D14(%rip),%r13
  jmp    L1
L103:
  mov    (%r12),%rax
  mov    (%rax,%rbx,8),%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,0x4(%rsp)
  jg     L103
L74:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x1,%r14d
  mov    0x4(%rsp),%eax
  add    $0x8,%r12
  cmp    %r14d,%eax
  jle    L106
L1:
  mov    $0x0,%ebx
  cmpl   $0x0,0x4(%rsp)
  jg     L103
  jmp    L74
L106:
  test   %eax,%eax
  jle    L56
  mov    $0x0,%ebx
L140:
  mov    0x0(%rbp,%rbx,8),%rdi
  call   <free@plt>
  movq   $0x0,0x0(%rbp,%rbx,8)
  add    $0x1,%rbx
  cmp    %ebx,0x4(%rsp)
  jg     L140
L56:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0x0,%eax
L63:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L158
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L158:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D28
data_type: string
name: extract_symbolic_data
arguments: tag: D29
data_type: string
name: extract_symbolic_data
arguments: tag: D14
data_type: string

tool: D28: %d

tool: D29: %li

tool: D14: %li 

assistant: ```c
int transponate_matrix() {
  int size = -2048;
  scanf("%d", &size);
  if (size == -2048) {
    return -2048;
  }
  long **matrix = calloc(size, sizeof(*matrix));
  assert(matrix);
  for (int i = 0; i < size; i++) {
    matrix[i] = calloc(size, sizeof(**matrix));
    assert(matrix[i]);
  }
  for (int i = 0; i < size; i++) {
    for (int j = 0; j < size; j++) {
      scanf("%li", &matrix[i][j]);
    }
  }
  for (int i = 0; i < size; i++) {
    for (int j = i + 1; j < size; j++) {
      long temp = matrix[i][j];
      matrix[i][j] = matrix[j][i];
      matrix[j][i] = temp;
    }
  }
  for (int i = 0; i < size; i++) {
    for (int j = 0; j < size; j++) {
      printf("%li ", matrix[i][j]);
    }
    printf("\n");
  }
  for (int i = 0; i < size; i++) {
    free(matrix[i]);
    matrix[i] = 0;
  }
  free(matrix);
  matrix = 0;
  return 0;
}
```