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

```asm
<isItMagic>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x10(%rsp)
  movq   $0x0,0x30(%rsp)
  movaps %xmm0,0x20(%rsp)
  test   %esi,%esi
  jle    L150
  mov    %esi,%eax
  movd   %esi,%xmm5
  mov    %esi,%ebx
  movdqa D69(%rip),%xmm4
  shr    $0x2,%eax
  pshufd $0x0,%xmm5,%xmm2
  lea    -0x1(%rsi),%r13d
  and    $0xfffffffc,%ebx
  mov    %eax,0xc(%rsp)
  xor    %edx,%edx
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  movdqa D51(%rip),%xmm3
  movdqa D68(%rip),%xmm6
  movdqa D63(%rip),%xmm5
  jmp    L215
  xchg   %ax,%ax
L76:
  movd   %edx,%xmm7
  movdqu (%rdi),%xmm8
  cmpl   $0x1,0xc(%rsp)
  pshufd $0x0,%xmm7,%xmm0
  movdqa 0x10(%rsp),%xmm9
  movdqa %xmm0,%xmm1
  movdqa %xmm0,%xmm7
  paddd  %xmm3,%xmm1
  pcmpeqd %xmm4,%xmm7
  paddd  %xmm8,%xmm9
  pcmpeqd %xmm2,%xmm1
  movaps %xmm9,0x10(%rsp)
  pand   %xmm8,%xmm7
  pand   %xmm8,%xmm1
  jbe    L16
  movdqa %xmm0,%xmm10
  paddd  %xmm5,%xmm0
  movdqu 0x10(%rdi),%xmm9
  pcmpeqd %xmm2,%xmm0
  pcmpeqd %xmm6,%xmm10
  paddd  %xmm9,%xmm8
  pand   %xmm9,%xmm0
  pand   %xmm9,%xmm10
  paddd  %xmm0,%xmm1
  movdqa 0x20(%rsp),%xmm0
  paddd  %xmm10,%xmm7
  paddd  %xmm9,%xmm0
  movaps %xmm0,0x20(%rsp)
L16:
  movdqa %xmm8,%xmm0
  psrldq $0x8,%xmm0
  paddd  %xmm8,%xmm0
  movdqa %xmm0,%xmm8
  psrldq $0x4,%xmm8
  paddd  %xmm8,%xmm0
  movd   %xmm0,%esi
  movdqa %xmm1,%xmm0
  psrldq $0x8,%xmm0
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  movdqa %xmm7,%xmm0
  psrldq $0x8,%xmm0
  add    %eax,%r9d
  paddd  %xmm7,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  add    %eax,%r8d
  mov    %ebx,%eax
  cmp    %ebx,%ebp
  je     L314
L340:
  movslq %eax,%r10
  cmp    %eax,%edx
  lea    (%rdi,%r10,4),%r11
  mov    (%r11),%ecx
  lea    (%r8,%rcx,1),%r14d
  lea    (%r9,%rcx,1),%r15d
  cmove  %r14d,%r8d
  lea    0x1(%rdx,%rax,1),%r14d
  cmp    %ebp,%r14d
  cmove  %r15d,%r9d
  add    %ecx,0x10(%rsp,%r10,4)
  add    %ecx,%esi
  lea    0x1(%rax),%ecx
  cmp    %ebp,%ecx
  jge    L314
  mov    0x4(%r11),%r10d
  cmp    %edx,%ecx
  lea    0x1(%rcx,%rdx,1),%r15d
  movslq %ecx,%rcx
  lea    (%r8,%r10,1),%r14d
  cmove  %r14d,%r8d
  cmp    %r15d,%ebp
  lea    (%r9,%r10,1),%r14d
  cmove  %r14d,%r9d
  add    $0x2,%eax
  add    %r10d,0x10(%rsp,%rcx,4)
  add    %r10d,%esi
  cmp    %eax,%ebp
  jle    L314
  mov    0x8(%r11),%ecx
  cmp    %eax,%edx
  lea    0x1(%rdx,%rax,1),%r11d
  cltq
  lea    (%r8,%rcx,1),%r10d
  cmove  %r10d,%r8d
  cmp    %r11d,%ebp
  lea    (%r9,%rcx,1),%r10d
  cmove  %r10d,%r9d
  add    %ecx,0x10(%rsp,%rax,4)
  add    %ecx,%esi
L314:
  cmp    %esi,%r12d
  jne    L336
  add    $0x1,%edx
  add    $0x28,%rdi
  cmp    %edx,%ebp
  je     L63
L215:
  cmp    $0x2,%r13d
  ja     L76
  xor    %eax,%eax
  xor    %esi,%esi
  jmp    L340
L336:
  lea    D3(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
L333:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L84
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  mov    0x10(%rsp),%eax
  cmp    %eax,%r12d
  jne    L100
  cmp    $0x1,%ebp
  je     L101
  mov    0x14(%rsp),%esi
  cmp    %esi,%r12d
  jne    L32
  cmp    $0x2,%ebp
  je     L101
  mov    0x18(%rsp),%esi
  cmp    %r12d,%esi
  jne    L32
  cmp    $0x3,%ebp
  je     L101
  mov    0x1c(%rsp),%esi
  cmp    %r12d,%esi
  jne    L32
  cmp    $0x4,%ebp
  je     L101
  mov    0x20(%rsp),%esi
  cmp    %eax,%esi
  jne    L32
  cmp    $0x5,%edx
  je     L101
  mov    0x24(%rsp),%esi
  cmp    %esi,%eax
  jne    L32
  cmp    $0x6,%edx
  je     L101
  mov    0x28(%rsp),%esi
  cmp    %esi,%eax
  jne    L32
  cmp    $0x7,%edx
  je     L101
  mov    0x2c(%rsp),%esi
  cmp    %esi,%eax
  jne    L32
  cmp    $0x8,%edx
  je     L101
  mov    0x30(%rsp),%esi
  cmp    %eax,%esi
  jne    L32
  cmp    $0x9,%edx
  je     L101
  mov    0x34(%rsp),%esi
  cmp    %eax,%esi
  jne    L32
L101:
  cmp    %r12d,%r8d
  jne    L149
  mov    $0x1,%eax
  cmp    %r8d,%r9d
  je     L333
  mov    %r9d,%esi
  lea    D79(%rip),%rdi
  call   <printf@plt>
  mov    %ebp,%esi
  lea    D21(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L333
L100:
  mov    %eax,%esi
L32:
  lea    D41(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L333
L149:
  mov    %r8d,%esi
  lea    D18(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L333
L150:
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  jmp    L101
L84:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D69
type: byte[16]
name: extract_symbolic_data
arguments: data_label: D51
type: byte[16]
name: extract_symbolic_data
arguments: data_label: D68
type: byte[16]
name: extract_symbolic_data
arguments: data_label: D63
type: byte[16]
name: extract_symbolic_data
arguments: data_label: D3
type: string
name: extract_symbolic_data
arguments: data_label: D79
type: string
name: extract_symbolic_data
arguments: data_label: D21
type: string
name: extract_symbolic_data
arguments: data_label: D41
type: string
name: extract_symbolic_data
arguments: data_label: D18
type: string

tool: {"D69": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D51": [0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D68": [0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00]}

tool: {"D63": [0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: D3: ROW SUM IS: %d

tool: D79: SECOND SUM IS: %d

tool: D21: 
Size is: %d


tool: D41: COL SUM IS: %d

tool: D18: MAIND SUM IS: %d

assistant: ```c
int isItMagic(int square[10][10], int squareSize, int sumOfSquare) {
  int row, mainDiag, secondDiag, columns[10], i, j;
  row = 0;
  mainDiag = 0;
  secondDiag = 0;
  for (i = 0; i < 10; i++) {
    columns[i] = 0;
  }
  for (i = 0; i < squareSize; i++) {
    for (j = 0; j < squareSize; j++) {
      if (i == j) {
        mainDiag += square[i][j];
      }
      if (i + j + 2 == squareSize + 1) {
        secondDiag += square[i][j];
      }
      columns[j] += square[i][j];
      row += square[i][j];
    }
    if (row != sumOfSquare) {
      printf("ROW SUM IS: %d", row);
      return -1;
    }
    row = 0;
  }
  for (i = 0; i < squareSize; i++) {
    if (columns[i] != sumOfSquare) {
      printf("COL SUM IS: %d", columns[i]);
      return -1;
    }
  }
  if (mainDiag != sumOfSquare) {
    printf("MAIND SUM IS: %d", mainDiag);
    return -1;
  }
  if (secondDiag != sumOfSquare) {
    printf("SECOND SUM IS: %d", secondDiag);
    printf("\nSize is: %d\n", squareSize);
    return -1;
  }
  return 1;
}
```