user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r12
  lea    D148(%rip),%rdi
  lea    D94(%rip),%r12
  push   %rbp
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D18(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%edi
  mov    %edi,%esi
  call   <createMatrix@plt>
  lea    D67(%rip),%rdi
  mov    %rax,%rbp
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  mov    %esi,%edx
  call   <inputMatrix@plt>
  lea    D139(%rip),%rdi
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  mov    %esi,%edx
  call   <displayMatrix@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <isUpperTriangular@plt>
  test   %rax,%rax
  je     L26
  lea    D132(%rip),%rdi
  call   <printf@plt>
L104:
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <isLowerTriangular@plt>
  test   %rax,%rax
  je     L100
  lea    D81(%rip),%rdi
  call   <printf@plt>
L91:
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <isIdentity@plt>
  test   %rax,%rax
  je     L94
  lea    D72(%rip),%rdi
  call   <printf@plt>
L38:
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <isDiagonal@plt>
  test   %rax,%rax
  je     L70
  lea    D100(%rip),%rdi
  call   <printf@plt>
L86:
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <isTriDiagonal@plt>
  test   %rax,%rax
  je     L58
  lea    D13(%rip),%rdi
  call   <printf@plt>
L35:
  mov    %r12,%rdi
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <delMatrix@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L26:
  lea    D4(%rip),%rdi
  call   <printf@plt>
  jmp    L104
L58:
  lea    D3(%rip),%rdi
  call   <printf@plt>
  jmp    L35
L70:
  lea    D122(%rip),%rdi
  call   <printf@plt>
  jmp    L86
L94:
  lea    D80(%rip),%rdi
  call   <printf@plt>
  jmp    L38
L100:
  lea    D15(%rip),%rdi
  call   <printf@plt>
  jmp    L91
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D148
datatype: string
name: retrieve_data
arguments: tag: D94
datatype: string
name: retrieve_data
arguments: tag: D18
datatype: string
name: retrieve_data
arguments: tag: D67
datatype: string
name: retrieve_data
arguments: tag: D139
datatype: string
name: retrieve_data
arguments: tag: D132
datatype: string
name: retrieve_data
arguments: tag: D81
datatype: string
name: retrieve_data
arguments: tag: D72
datatype: string
name: retrieve_data
arguments: tag: D100
datatype: string
name: retrieve_data
arguments: tag: D13
datatype: string
name: retrieve_data
arguments: tag: D4
datatype: string
name: retrieve_data
arguments: tag: D3
datatype: string
name: retrieve_data
arguments: tag: D122
datatype: string
name: retrieve_data
arguments: tag: D80
datatype: string
name: retrieve_data
arguments: tag: D15
datatype: string

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


tool: D94: 



tool: D18: %d

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


tool: D139: The matrix you have entered is:



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


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


tool: D72: The matrix is an Identity matrix.


tool: D100: The matrix is a Diagonal matrix.


tool: D13: The matrix is a Tridiagonal matrix.


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


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


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


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


tool: D15: The matrix is not a Lower Triangular 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;
}
```