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

```asm
<IsItMagic>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x10(%rsp)
  test   %esi,%esi
  jle    L81
  mov    %rdi,%r15
  mov    %esi,%r12d
  mov    %rdi,(%rsp)
  lea    0xf9c(%rdi),%rcx
  mov    %rcx,0x18(%rsp)
  lea    -0x1(%rsi),%eax
  imul   $0xf9c,%rax,%rax
  add    %rcx,%rax
  mov    %rax,0x8(%rsp)
  lea    D27(%rip),%r14
  lea    -0x1(%rsi),%r13d
  jmp    L104
L56:
  lea    0x1(%rbx),%eax
  add    $0x4,%rbp
  cmp    %eax,%r12d
  je     L31
  mov    %eax,%ebx
L41:
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  cmp    %ebx,%r13d
  jne    L56
  lea    D25(%rip),%rdi
  call   <printf@plt>
  jmp    L56
L31:
  add    $0xf9c,%r15
  cmp    0x8(%rsp),%r15
  je     L68
L104:
  mov    %r15,%rbp
  mov    $0x0,%ebx
  jmp    L41
L68:
  mov    %ebx,%ecx
  imul   $0xf9c,%rcx,%rcx
  add    0x18(%rsp),%rcx
  mov    $0x0,%edx
L62:
  mov    (%rsp),%rsi
  add    (%rsi),%edx
  add    $0xf9c,%rsi
  mov    %rsi,(%rsp)
  cmp    %rcx,%rsi
  jne    L62
  cltq
  imul   $0xf9c,%rax,%rax
  mov    0x10(%rsp),%rcx
  lea    -0xf9c(%rcx,%rax,1),%rax
  mov    $0x0,%esi
  mov    $0x0,%ecx
L92:
  add    (%rax),%ecx
  add    (%rax),%esi
  sub    $0x1,%ebx
  sub    $0xf98,%rax
  cmp    $0xffffffff,%ebx
  jne    L92
  cmp    %edx,%ecx
  jne    L112
  cmp    %edx,%esi
  jne    L112
  lea    D32(%rip),%rdi
  call   <printf@plt>
L81:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L112:
  lea    D18(%rip),%rdi
  call   <printf@plt>
  jmp    L81
```

tool_calls: name: unpack_data
arguments: tag: D27
type_guessed: string
name: unpack_data
arguments: tag: D25
type_guessed: string
name: unpack_data
arguments: tag: D32
type_guessed: string
name: unpack_data
arguments: tag: D18
type_guessed: string

tool: D27: %d

tool: D25: 


tool: D32: Magic! 


tool: D18: No Magic! 


assistant: ```c
void IsItMagic(int square[999][999], int inp) {
  int count, subcount;
  int magic = 1;
  for (count = 0; count < inp; count++) {
    for (subcount = 0; subcount < inp; subcount++) {
      scanf("%d", &square[count][subcount]);
      if (subcount == inp - 1)
        printf("\n");
    }
  }
  int sum_l_r = 0;
  int prevsum_l_r = 0;
  int sum_u_d = 0;
  int prevsum_u_d = 0;
  for (count = 0; count < inp; count++) {
    prevsum_l_r = sum_l_r;
    sum_l_r = 0;
    prevsum_u_d = sum_u_d;
    sum_u_d = 0;
    for (subcount = 0; subcount < inp; subcount++) {
      sum_l_r = sum_l_r + square[count][subcount];
      sum_u_d = sum_u_d + square[subcount][count];
    }
    if (count == 0) {
      prevsum_l_r = sum_l_r;
      prevsum_u_d = sum_u_d;
    }
    if (sum_l_r != prevsum_l_r || sum_u_d != prevsum_u_d)
      magic = 0;
    subcount = 0;
    int sumdiag_l_r = 0;
    int sumdiag_r_l = 0;
    for (count = inp - 1; count >= 0; count--) {
      sumdiag_l_r = sumdiag_l_r + square[count][subcount];
      sumdiag_r_l = sumdiag_r_l + square[count][subcount];
      subcount = subcount + 1;
    }
    if (sumdiag_l_r != sum_u_d || sumdiag_r_l != sum_u_d)
      magic = 0;
    if (magic == 1) {
      printf("Magic! \n");
      break;
    } else {
      printf("No Magic! \n");
      break;
    }
  }
}
```