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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xca0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc98(%rsp)
  xor    %eax,%eax
  lea    D40(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rdx
  mov    %rsp,%rsi
  lea    D71(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D52(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,(%rsp)
  jle    L50
  lea    0x10(%rsp),%r14
  mov    $0x0,%r13d
  lea    D50(%rip),%r12
  jmp    L496
L175:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x1,%ebx
  add    $0x4,%rbp
  cmp    %ebx,0x4(%rsp)
  jg     L175
L478:
  add    $0x1,%r13
  add    $0x50,%r14
  cmp    %r13d,(%rsp)
  jle    L50
L496:
  mov    %r14,%rbp
  mov    $0x0,%ebx
  cmpl   $0x0,0x4(%rsp)
  jg     L175
  jmp    L478
L50:
  lea    D40(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  lea    D71(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D52(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L104
  lea    0x650(%rsp),%r14
  mov    $0x0,%r13d
  lea    D50(%rip),%r12
  jmp    L34
L59:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x1,%ebx
  add    $0x4,%rbp
  cmp    %ebx,0xc(%rsp)
  jg     L59
L477:
  add    $0x1,%r13
  add    $0x50,%r14
  cmp    %r13d,0x8(%rsp)
  jle    L104
L34:
  mov    %r14,%rbp
  mov    $0x0,%ebx
  cmpl   $0x0,0xc(%rsp)
  jg     L59
  jmp    L477
L104:
  lea    D150(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,(%rsp)
  jle    L247
  lea    0x10(%rsp),%rbp
  mov    $0x0,%r13d
  lea    D57(%rip),%r12
  jmp    L351
L202:
  mov    0x0(%rbp,%rbx,4),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,0x4(%rsp)
  jg     L202
L410:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x1,%r13d
  add    $0x50,%rbp
  cmp    %r13d,(%rsp)
  jle    L247
L351:
  mov    $0x0,%ebx
  cmpl   $0x0,0x4(%rsp)
  jg     L202
  jmp    L410
L247:
  lea    D79(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L174
  lea    0x650(%rsp),%rbp
  mov    $0x0,%r13d
  lea    D57(%rip),%r12
  jmp    L84
L264:
  mov    0x0(%rbp,%rbx,4),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,0xc(%rsp)
  jg     L264
L374:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x1,%r13d
  mov    0x8(%rsp),%eax
  add    $0x50,%rbp
  cmp    %r13d,%eax
  jle    L174
L84:
  mov    $0x0,%ebx
  cmpl   $0x0,0xc(%rsp)
  jg     L264
  jmp    L374
L174:
  mov    0x4(%rsp),%edx
  cmp    %eax,%edx
  je     L266
  cmp    %eax,(%rsp)
  je     L30
L109:
  lea    D41(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
L201:
  mov    0xc98(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L431
  add    $0xca0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L266:
  mov    (%rsp),%edi
  cmp    %edi,0xc(%rsp)
  je     L124
  cmp    %eax,%edi
  jne    L109
  cmp    0xc(%rsp),%edx
  je     L332
  mov    (%rsp),%edi
  cmp    %edi,0xc(%rsp)
  jne    L109
  jmp    L76
L124:
  lea    -0x1(%rax),%r9d
  movslq %r9d,%rdx
  lea    0x10(%rsp,%rdx,4),%r10
  lea    -0x1(%rdi),%r8d
  lea    0x650(%rsp),%rbx
  mov    %r9d,%r11d
  add    $0x1,%r8
  imul   $0x50,%r8,%r8
L53:
  test   %r9d,%r9d
  js     L365
  test   %edi,%edi
  jle    L41
  mov    %r11d,%ecx
  sub    %r9d,%ecx
  movslq %ecx,%rcx
  imul   $0x50,%rcx,%rcx
  add    %rbx,%rcx
  lea    (%r8,%r10,1),%rsi
  mov    %r10,%rdx
L252:
  mov    (%rcx),%r14d
  cmp    %r14d,(%rdx)
  jne    L307
  add    $0x50,%rdx
  add    $0x4,%rcx
  cmp    %rsi,%rdx
  jne    L252
L41:
  sub    $0x1,%r9d
  sub    $0x4,%r10
  jmp    L53
L365:
  lea    D103(%rip),%rdi
  call   <puts@plt>
  jmp    L201
L177:
  lea    D17(%rip),%rdi
  call   <puts@plt>
  jmp    L201
L87:
  lea    D138(%rip),%rdi
  call   <puts@plt>
  jmp    L201
L307:
  mov    (%rsp),%edi
L76:
  movslq %edi,%rdx
  imul   $0x50,%rdx,%rdx
  lea    -0x40(%rsp,%rdx,1),%r10
  lea    0x650(%rsp),%r8
  lea    -0x1(%rdi),%edx
  mov    $0x0,%r9d
  lea    0x4(,%rdx,4),%r11
L17:
  cmp    %eax,%r9d
  jge    L87
  test   %edi,%edi
  jle    L411
  lea    (%r11,%r8,1),%rsi
  mov    %r8,%rdx
  mov    %r10,%rcx
L137:
  mov    (%rdx),%ebx
  cmp    %ebx,(%rcx)
  jne    L109
  sub    $0x50,%rcx
  add    $0x4,%rdx
  cmp    %rsi,%rdx
  jne    L137
L411:
  add    $0x1,%r9d
  add    $0x4,%r10
  add    $0x50,%r8
  jmp    L17
L30:
  cmp    0xc(%rsp),%edx
  jne    L109
L332:
  lea    -0x1(%rax),%r8d
  movslq %r8d,%rcx
  imul   $0x50,%rcx,%rcx
  lea    0x10(%rsp,%rcx,1),%rdi
  lea    -0x1(%rdx),%esi
  lea    0x650(%rsp),%r9
  mov    %r8d,%eax
L454:
  test   %r8d,%r8d
  js     L177
  test   %esi,%esi
  js     L499
  movslq %esi,%rdx
  mov    %eax,%ecx
  sub    %r8d,%ecx
  movslq %ecx,%rcx
  imul   $0x50,%rcx,%rcx
  add    %r9,%rcx
L339:
  mov    (%rcx),%ebx
  cmp    %ebx,(%rdi,%rdx,4)
  jne    L109
  sub    $0x1,%rdx
  add    $0x4,%rcx
  test   %edx,%edx
  jns    L339
L499:
  sub    $0x1,%r8d
  sub    $0x50,%rdi
  jmp    L454
L431:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D40
type: string
name: disassemble_data
arguments: data_tag: D71
type: string
name: disassemble_data
arguments: data_tag: D52
type: string
name: disassemble_data
arguments: data_tag: D50
type: string
name: disassemble_data
arguments: data_tag: D150
type: string
name: disassemble_data
arguments: data_tag: D57
type: string
name: disassemble_data
arguments: data_tag: D79
type: string
name: disassemble_data
arguments: data_tag: D41
type: string
name: disassemble_data
arguments: data_tag: D103
type: string
name: disassemble_data
arguments: data_tag: D17
type: string
name: disassemble_data
arguments: data_tag: D138
type: string

tool: D40: Row  and  coloumn : 

tool: D71: %d %d

tool: D52: Elements to array : 

tool: D50: %d

tool: D150: Array A   Elements  : 

tool: D57: %d 

tool: D79: Array B  Elements  : 

tool: D41: 
FALSE

tool: D103: 
TRUE  (90 Deg)

tool: D17: 
TRUE  (180 Deg)

tool: D138: 
TRUE (270 Deg)

assistant: ```c
int main(void) {
  int a[20][20], b[20][20], i, j, r1, c1, r2, c2;
  printf("Row  and  coloumn : ");
  scanf("%d %d", &r1, &c1);
  printf("Elements to array : ");
  for (i = 0; i < r1; i++)
    for (j = 0; j < c1; j++)
      scanf("%d", &a[i][j]);
  printf("Row  and  coloumn : ");
  scanf("%d %d", &r2, &c2);
  printf("Elements to array : ");
  for (i = 0; i < r2; i++)
    for (j = 0; j < c2; j++)
      scanf("%d", &b[i][j]);
  printf("Array A   Elements  : \n");
  for (i = 0; i < r1; i++) {
    for (j = 0; j < c1; j++)
      printf("%d ", a[i][j]);
    printf("\n");
  }
  printf("Array B  Elements  : \n");
  for (i = 0; i < r2; i++) {
    for (j = 0; j < c2; j++)
      printf("%d ", b[i][j]);
    printf("\n");
  }
  if (r2 == c1 && c2 == r1) {
    for (i = c1 - 1; i >= 0; i--)
      for (j = 0; j < r1; j++)
        if (a[j][i] != b[c1 - 1 - i][j])
          goto NEXT1;
    printf("\nTRUE  (90 Deg)\n");
    return;
  }
  if (r2 == r1 && c2 == c1) {
    for (i = r1 - 1; i >= 0; i--)
      for (j = c1 - 1; j >= 0; j--)
        if (a[i][j] != b[r1 - 1 - i][c1 - 1 - j])
          goto NEXT2;
    printf("\nTRUE  (180 Deg)\n");
    return;
  }
NEXT1:
  if (r2 == c1 && c2 == r1) {
    for (i = 0; i < c1; i++)
      for (j = r1 - 1; j >= 0; j--)
        if (a[j][i] != b[i][r1 - 1 - j])
          goto NEXT2;
    printf("\nTRUE (270 Deg)\n");
    return;
  }
NEXT2:
  printf("\nFALSE\n");
  return 0;
}
```