user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<if_square_is_magic>:
  endbr64
  push   %r15
  movslq %edi,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,-0x18(%rsp)
  mov    %rax,-0x10(%rsp)
  test   %edi,%edi
  jle    L142
  lea    -0x1(%rdi),%r14d
  cmp    $0x2,%r14d
  jbe    L137
  mov    %edi,%edx
  mov    %rsi,%rax
  pxor   %xmm0,%xmm0
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rsi,%rdx,1),%rdx
  nopl   0x0(%rax)
L16:
  movdqu (%rax),%xmm3
  add    $0x10,%rax
  paddd  %xmm3,%xmm0
  cmp    %rdx,%rax
  jne    L16
  movdqa %xmm0,%xmm1
  mov    %edi,%eax
  psrldq $0x8,%xmm1
  and    $0xfffffffc,%eax
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%esi
  test   $0x3,%dil
  je     L181
L96:
  mov    -0x18(%rsp),%rbx
  movslq %eax,%rdx
  lea    0x1(%rax),%ecx
  lea    (%rbx,%rdx,4),%rdx
  add    (%rdx),%esi
  cmp    %ecx,%edi
  jle    L181
  add    $0x2,%eax
  add    0x4(%rdx),%esi
  cmp    %eax,%edi
  jle    L181
  add    0x8(%rdx),%esi
L181:
  mov    -0x10(%rsp),%rax
  mov    -0x18(%rsp),%r9
  mov    %edi,%ebp
  xor    %edx,%edx
  and    $0xfffffffc,%ebp
  mov    $0x1,%r8d
  xor    %r15d,%r15d
  lea    0x0(,%rax,4),%rcx
  mov    %edi,%eax
  mov    %r9,%r11
  shr    $0x2,%eax
  lea    -0x1(%rax),%r13d
  add    $0x1,%r13
  shl    $0x4,%r13
  cmp    $0x2,%r14d
  jbe    L99
  nopl   0x0(%rax)
L132:
  lea    0x0(%r13,%r9,1),%r10
  mov    %r9,%rax
  pxor   %xmm0,%xmm0
  nopl   0x0(%rax)
L58:
  movdqu (%rax),%xmm2
  add    $0x10,%rax
  paddd  %xmm2,%xmm0
  cmp    %r10,%rax
  jne    L58
  movdqa %xmm0,%xmm1
  mov    %ebp,%r10d
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  cmp    %ebp,%edi
  je     L109
L42:
  movslq %r10d,%rbx
  lea    0x1(%r10),%r12d
  lea    (%r9,%rbx,4),%rbx
  add    (%rbx),%eax
  cmp    %r12d,%edi
  jle    L109
  add    $0x2,%r10d
  add    0x4(%rbx),%eax
  cmp    %r10d,%edi
  jle    L109
  add    0x8(%rbx),%eax
L109:
  cmp    %esi,%eax
  lea    0x1(%rdx),%eax
  cmovne %r15d,%r8d
  add    %rcx,%r9
  cmp    %eax,%edi
  je     L9
  mov    %eax,%edx
  cmp    $0x2,%r14d
  ja     L132
L99:
  xor    %eax,%eax
  xor    %r10d,%r10d
  jmp    L42
  cs nopw 0x0(%rax,%rax,1)
L9:
  mov    -0x18(%rsp),%rbp
  mov    %r14d,%eax
  xor    %r12d,%r12d
  lea    0x4(%rbp,%rax,4),%r13
L124:
  mov    %rbp,%r9
  xor    %r10d,%r10d
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L93:
  mov    %eax,%ebx
  add    (%r9),%r10d
  add    $0x1,%eax
  add    %rcx,%r9
  cmp    %ebx,%edx
  jne    L93
  cmp    %esi,%r10d
  cmovne %r12d,%r8d
  add    $0x4,%rbp
  cmp    %r13,%rbp
  jne    L124
  add    $0x4,%rcx
  xor    %r9d,%r9d
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L122:
  mov    %eax,%r10d
  add    (%r11),%r9d
  add    $0x1,%eax
  add    %rcx,%r11
  cmp    %r10d,%edx
  jne    L122
  cmp    %esi,%r9d
  mov    $0x0,%eax
  cmovne %eax,%r8d
  mov    -0x10(%rsp),%rax
  cmove  %r14d,%edx
  xor    %ecx,%ecx
  lea    -0x4(,%rax,4),%r9
  mov    -0x18(%rsp),%rax
  movslq %edx,%rdx
  lea    (%rax,%rdx,4),%rdx
  xor    %eax,%eax
  xchg   %ax,%ax
L52:
  add    $0x1,%eax
  add    (%rdx),%ecx
  add    %r9,%rdx
  cmp    %eax,%edi
  jg     L52
  xor    %eax,%eax
  cmp    %esi,%ecx
  pop    %rbx
  pop    %rbp
  cmovne %eax,%r8d
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  mov    %r8d,%eax
  ret
L142:
  mov    $0x1,%r8d
  pop    %rbx
  pop    %rbp
  mov    %r8d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L137:
  xor    %esi,%esi
  xor    %eax,%eax
  jmp    L96
```

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;
}
```