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

```asm
<isitmagic>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L158
L99:
  mov    -0x18(%rbp),%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  add    %eax,-0x8(%rbp)
  addl   $0x1,-0x10(%rbp)
L158:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L99
  movl   $0x1,-0x10(%rbp)
  jmp    L160
L38:
  movl   $0x0,-0xc(%rbp)
  jmp    L176
L139:
  mov    -0x10(%rbp),%eax
  cltq
  imul   $0xf9c,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  add    %eax,-0x4(%rbp)
  addl   $0x1,-0xc(%rbp)
L176:
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L139
  mov    -0x4(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  je     L55
  mov    $0x0,%eax
  jmp    L224
L55:
  movl   $0x0,-0x4(%rbp)
  addl   $0x1,-0x10(%rbp)
L160:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L38
  movl   $0x0,-0x10(%rbp)
  jmp    L133
L92:
  movl   $0x0,-0xc(%rbp)
  jmp    L214
L49:
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0xf9c,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  add    %eax,-0x4(%rbp)
  addl   $0x1,-0xc(%rbp)
L214:
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L49
  mov    -0x4(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  je     L4
  mov    $0x0,%eax
  jmp    L224
L4:
  movl   $0x0,-0x4(%rbp)
  addl   $0x1,-0x10(%rbp)
L133:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L92
  movl   $0x0,-0x10(%rbp)
  jmp    L201
L25:
  mov    -0x10(%rbp),%eax
  cltq
  imul   $0xf9c,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  add    %eax,-0x4(%rbp)
  addl   $0x1,-0x10(%rbp)
L201:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L25
  mov    -0x4(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  je     L206
  mov    $0x0,%eax
  jmp    L224
L206:
  movl   $0x0,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L238
L13:
  movl   $0x0,-0xc(%rbp)
  jmp    L22
L85:
  mov    -0x10(%rbp),%eax
  cltq
  imul   $0xf9c,%rax,%rax
  lea    -0xf9c(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  add    %eax,-0x4(%rbp)
  addl   $0x1,-0xc(%rbp)
L22:
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L85
  mov    -0x4(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  je     L202
  mov    $0x0,%eax
  jmp    L224
L202:
  movl   $0x0,-0x4(%rbp)
  subl   $0x1,-0x10(%rbp)
L238:
  cmpl   $0x0,-0x10(%rbp)
  jg     L13
  mov    $0x1,%eax
L224:
  pop    %rbp
  ret
```

assistant: ```c
int isitmagic(int square[999][999], int size) {
  int i, ii, sum = 0, sum2 = 0;
  for (i = 0; i < size; i++) {
    sum += square[0][i];
  }
  for (i = 1; i < size; i++) {
    for (ii = 0; ii < size; ii++)
      sum2 += square[i][ii];
    if (sum2 != sum)
      return 0;
    sum2 = 0;
  }
  for (i = 0; i < size; i++) {
    for (ii = 0; ii < size; ii++)
      sum2 += square[ii][i];
    if (sum2 != sum)
      return 0;
    sum2 = 0;
  }
  for (i = 0; i < size; i++) {
    sum2 += square[i][i];
  }
  if (sum2 != sum)
    return 0;
  sum2 = 0;
  for (i = size; i > 0; i--) {
    for (ii = 0; ii < size; ii++)
      sum2 += square[i - 1][ii];
    if (sum2 != sum)
      return 0;
    sum2 = 0;
  }
  return 1;
}
```