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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D72(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x14(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <createMatrix@plt>
  mov    %rax,-0x10(%rbp)
  lea    D98(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x14(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <inputMatrix@plt>
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x14(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <displayMatrix@plt>
  lea    D145(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <isUpperTriangular@plt>
  test   %rax,%rax
  je     L40
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L97
L40:
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L97:
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <isLowerTriangular@plt>
  test   %rax,%rax
  je     L21
  lea    D117(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L90
L21:
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L90:
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <isIdentity@plt>
  test   %rax,%rax
  je     L28
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L31
L28:
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L31:
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <isDiagonal@plt>
  test   %rax,%rax
  je     L43
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L63
L43:
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L63:
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <isTriDiagonal@plt>
  test   %rax,%rax
  je     L79
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L65
L79:
  lea    D159(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L65:
  lea    D145(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <delMatrix@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L56
  call   <__stack_chk_fail@plt>
L56:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D32
type: string
name: unpack_data
arguments: label: D72
type: string
name: unpack_data
arguments: label: D98
type: string
name: unpack_data
arguments: label: D19
type: string
name: unpack_data
arguments: label: D145
type: string
name: unpack_data
arguments: label: D31
type: string
name: unpack_data
arguments: label: D50
type: string
name: unpack_data
arguments: label: D117
type: string
name: unpack_data
arguments: label: D68
type: string
name: unpack_data
arguments: label: D148
type: string
name: unpack_data
arguments: label: D51
type: string
name: unpack_data
arguments: label: D73
type: string
name: unpack_data
arguments: label: D87
type: string
name: unpack_data
arguments: label: D70
type: string
name: unpack_data
arguments: label: D159
type: string

tool: D32: Please enter the order for a 2D square matrix.


tool: D72: %d

tool: D98: Please enter the elements for the matrix.


tool: D19: The matrix you have entered is:



tool: D145: 



tool: D31: The matrix is an Upper Triangular matrix.


tool: D50: The matrix is not an Upper Triangular matrix.


tool: D117: The matrix is a Lower Triangular matrix.


tool: D68: The matrix is not a Lower Triangular matrix.


tool: D148: The matrix is an Identity matrix.


tool: D51: The matrix is not an Identity matrix.


tool: D73: The matrix is a Diagonal matrix.


tool: D87: The matrix is not a Diagonal matrix.


tool: D70: The matrix is a Tridiagonal matrix.


tool: D159: The matrix is not a Tridiagonal matrix.


assistant: ```c
int main() {
  int **mat, size;
  printf("Please enter the order for a 2D square matrix.\n");
  scanf("%d", &size);
  mat = createMatrix(size, size);
  printf("Please enter the elements for the matrix.\n");
  inputMatrix(mat, size, size);
  printf("The matrix you have entered is:\n\n");
  displayMatrix(mat, size, size);
  printf("\n\n");
  if (isUpperTriangular(mat, size))
    printf("The matrix is an Upper Triangular matrix.\n");
  else
    printf("The matrix is not an Upper Triangular matrix.\n");
  if (isLowerTriangular(mat, size))
    printf("The matrix is a Lower Triangular matrix.\n");
  else
    printf("The matrix is not a Lower Triangular matrix.\n");
  if (isIdentity(mat, size))
    printf("The matrix is an Identity matrix.\n");
  else
    printf("The matrix is not an Identity matrix.\n");
  if (isDiagonal(mat, size))
    printf("The matrix is a Diagonal matrix.\n");
  else
    printf("The matrix is not a Diagonal matrix.\n");
  if (isTriDiagonal(mat, size))
    printf("The matrix is a Tridiagonal matrix.\n");
  else
    printf("The matrix is not a Tridiagonal matrix.\n");
  printf("\n\n");
  delMatrix(mat, size);
  return 0;
}
```