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

```asm
<if_square_is_magic>:
  endbr64
  push   %r15
  movslq %edi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %r15d,%r15d
  jle    L36
  lea    -0x1(%r15),%r11d
  mov    %r15,%rbp
  mov    %rsi,%r14
  mov    %rsi,%rbx
  mov    %r11d,-0x4(%rsp)
  shl    $0x2,%r11
  mov    %rsi,%rax
  xor    %edx,%edx
  lea    0x4(%rsi,%r11,1),%r12
  nopw   0x0(%rax,%rax,1)
L88:
  add    (%rax),%edx
  add    $0x4,%rax
  mov    %edx,%r10d
  cmp    %r12,%rax
  jne    L88
  mov    $0xfffffffffffffffc,%rsi
  lea    0x0(,%r15,4),%r8
  mov    %r12,%rcx
  xor    %edi,%edi
  sub    %r11,%rsi
  mov    $0x1,%r9d
  xor    %r11d,%r11d
  xchg   %ax,%ax
L3:
  lea    (%rsi,%rcx,1),%rax
  xor    %edx,%edx
  cs nopw 0x0(%rax,%rax,1)
L68:
  add    (%rax),%edx
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L68
  cmp    %r10d,%edx
  lea    0x1(%rdi),%edx
  lea    (%rax,%r8,1),%rcx
  cmovne %r11d,%r9d
  cmp    %edx,%ebp
  je     L27
  mov    %edx,%edi
  jmp    L3
  nopl   0x0(%rax)
L27:
  mov    %r14,%r11
  xor    %r13d,%r13d
  xchg   %ax,%ax
L34:
  mov    %r11,%rdx
  xor    %ecx,%ecx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L35:
  mov    %eax,%esi
  add    (%rdx),%ecx
  add    $0x1,%eax
  add    %r8,%rdx
  cmp    %esi,%edi
  jne    L35
  cmp    %r10d,%ecx
  cmovne %r13d,%r9d
  add    $0x4,%r11
  cmp    %r12,%r11
  jne    L34
  add    $0x4,%r8
  xor    %edx,%edx
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L59:
  mov    %eax,%ecx
  add    (%rbx),%edx
  add    $0x1,%eax
  add    %r8,%rbx
  cmp    %ecx,%edi
  jne    L59
  cmp    %r10d,%edx
  cmove  -0x4(%rsp),%edi
  mov    $0x0,%eax
  cmovne %eax,%r9d
  lea    -0x4(,%r15,4),%rsi
  xor    %ecx,%ecx
  movslq %edi,%rdi
  lea    (%r14,%rdi,4),%rdx
L87:
  add    $0x1,%eax
  add    (%rdx),%ecx
  add    %rsi,%rdx
  cmp    %eax,%ebp
  jg     L87
  xor    %eax,%eax
  cmp    %r10d,%ecx
  pop    %rbx
  pop    %rbp
  cmovne %eax,%r9d
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  mov    %r9d,%eax
  ret
L36:
  mov    $0x1,%r9d
  pop    %rbx
  pop    %rbp
  mov    %r9d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int if_square_is_magic(int size, int square[size][size]) {
  int row, column, magic = 1, i;
  int sum = 0;
  int new_sum = 0;
  for (column = 0; column < size; column++) {
    sum = sum + square[0][column];
  }
  for (row = 0; row < size; row++) {
    for (column = 0; column < size; column++) {
      new_sum = new_sum + square[row][column];
    }
    if (!(new_sum == sum)) {
      magic = 0;
    }
    new_sum = 0;
  }
  new_sum = 0;
  for (column = 0; column < size; column++) {
    for (row = 0; row < size; row++) {
      new_sum = new_sum + square[row][column];
    }
    if (!(new_sum == sum)) {
      magic = 0;
    }
    new_sum = 0;
  }
  new_sum = 0;
  for (i = 0; i < size; i++) {
    new_sum = new_sum + square[i][i];
  }
  if (!(new_sum == sum)) {
    magic = 0;
  }
  new_sum = 0;
  row = 0;
  column = size - 1;
  for (i = 0; i < size; i++) {
    new_sum = new_sum + square[row][column];
    row++;
    column--;
  }
  if (!(new_sum == sum)) {
    magic = 0;
  }
  return magic;
}
```