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

```asm
<main>:
  endbr64
  push   %rbp
  lea    D22(%rip),%rdi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    -0x44(%rbp),%rsi
  push   %r13
  push   %r12
  push   %rbx
  lea    -0x3c(%rbp),%rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x44(%rbp),%eax
  mov    %rbx,-0x90(%rbp)
  lea    -0x40(%rbp),%rbx
  mov    %rbx,-0x88(%rbp)
  lea    -0x1(%rax),%edx
  mov    %edx,-0x44(%rbp)
  test   %eax,%eax
  je     L151
L39:
  mov    -0x90(%rbp),%rdx
  mov    -0x88(%rbp),%rsi
  xor    %eax,%eax
  mov    %rsp,-0x80(%rbp)
  lea    D25(%rip),%rdi
  call   <scanf@plt>
  movslq -0x3c(%rbp),%rcx
  movslq -0x40(%rbp),%rdx
  mov    %rsp,%rsi
  mov    %rdx,%rdi
  imul   %rcx,%rdx
  lea    0x0(,%rcx,8),%rbx
  mov    %rcx,%rax
  mov    %rbx,-0x78(%rbp)
  lea    0xf(,%rdx,8),%rcx
  mov    %rcx,%rdx
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L135
L195:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L195
L135:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L165
  orq    $0x0,-0x8(%rsp,%rdx,1)
L165:
  mov    %rsp,%r14
  test   %edi,%edi
  jle    L60
  mov    -0x78(%rbp),%r15
  mov    %r14,-0x60(%rbp)
  mov    %r14,%r12
  xor    %r13d,%r13d
  mov    %r15,%rbx
  shr    $0x3,%rbx
  mov    %rbx,-0x58(%rbp)
  test   %eax,%eax
  jle    L1
  nopl   0x0(%rax,%rax,1)
L20:
  mov    %r12,%r14
  xor    %ebx,%ebx
  nopl   (%rax)
L15:
  mov    %r14,%rsi
  lea    D11(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <scanf@plt>
  mov    -0x3c(%rbp),%eax
  add    $0x8,%r14
  cmp    %ebx,%eax
  jg     L15
  mov    -0x40(%rbp),%edi
  add    $0x1,%r13d
  cmp    %r13d,%edi
  jle    L10
  add    %r15,%r12
  test   %eax,%eax
  jg     L20
L1:
  mov    -0x58(%rbp),%rbx
  mov    -0x60(%rbp),%r14
L92:
  movq   $0x0,-0x68(%rbp)
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  mov    %rbx,%r15
  test   %eax,%eax
  jle    L101
  nop
L115:
  mov    -0x68(%rbp),%rbx
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  mov    %eax,%esi
  add    %r14,%rbx
  mov    %rbx,-0x70(%rbp)
  mov    %r15,%rbx
  cs nopw 0x0(%rax,%rax,1)
L32:
  sub    %r9d,%esi
  sub    %r13d,%edi
  mov    %r10,-0x60(%rbp)
  mov    %r9d,-0x58(%rbp)
  call   <min@plt>
  mov    -0x58(%rbp),%esi
  mov    %r13d,%edi
  mov    %eax,%r15d
  call   <min@plt>
  lea    -0x1(%r15),%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    -0x58(%rbp),%r9d
  mov    -0x60(%rbp),%r10
  test   %eax,%eax
  mov    %eax,%r15d
  js     L207
  mov    -0x70(%rbp),%rax
  xor    %ecx,%ecx
  movslq %r9d,%rdi
  lea    (%rax,%r10,1),%rsi
  mov    %r12,%rax
  neg    %rax
  lea    (%r10,%rax,8),%r11
  add    -0x68(%rbp),%r11
  add    %r14,%r11
  jmp    L19
  nopl   0x0(%rax,%rax,1)
L63:
  mov    (%rsi),%rax
  cmp    %rax,(%r11,%r12,8)
  jne    L207
  add    $0x1,%ecx
  add    $0x1,%r12
  sub    $0x8,%rsi
  cmp    %ecx,%r15d
  jl     L207
L19:
  mov    %r13d,%eax
  lea    0x0(%r13,%rcx,1),%edx
  sub    %ecx,%eax
  movslq %edx,%rdx
  cltq
  imul   %rbx,%rdx
  imul   %rbx,%rax
  add    %rdi,%rdx
  add    %rdi,%rax
  mov    (%r14,%rax,8),%rax
  cmp    %rax,(%r14,%rdx,8)
  je     L63
L207:
  mov    -0x3c(%rbp),%esi
  add    $0x1,%r9d
  mov    -0x40(%rbp),%edi
  add    $0x8,%r10
  cmp    %r9d,%esi
  jg     L32
  add    $0x1,%r13d
  mov    %rbx,%r15
  mov    %esi,%eax
  cmp    %r13d,%edi
  jle    L101
  mov    -0x78(%rbp),%rsi
  add    %rsi,-0x68(%rbp)
  test   %eax,%eax
  jg     L115
L101:
  mov    %r12,%rsi
  lea    D23(%rip),%rdi
  call   <printf@plt>
  mov    -0x44(%rbp),%eax
  mov    -0x80(%rbp),%rsp
  lea    -0x1(%rax),%edx
  mov    %edx,-0x44(%rbp)
  test   %eax,%eax
  jne    L39
L151:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L153
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L10:
  mov    -0x58(%rbp),%rbx
  mov    -0x60(%rbp),%r14
  test   %edi,%edi
  jg     L92
L60:
  xor    %r12d,%r12d
  jmp    L101
L153:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D22
data_type: string
name: extract_symbolic_data
arguments: data_label: D25
data_type: string
name: extract_symbolic_data
arguments: data_label: D11
data_type: string
name: extract_symbolic_data
arguments: data_label: D23
data_type: string

tool: D22: %d

tool: D25: %d %d

tool: D11: %zu

tool: D23: %zu


assistant: ```c
int main() {
  int t, n, m;
  scanf("%d", &t);
  while (t--) {
    scanf("%d %d", &n, &m);
    size_t a[n][m];
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < m; ++j)
        scanf("%zu", a[i] + j);
    size_t count = 0;
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < m; ++j) {
        int max = min(min(i, j), min(n - i, m - j) - 1);
        for (int k = 0; k <= max && a[i + k][j] == a[i - k][j] && a[i][j + k] == a[i][j - k]; count++, ++k)
          ;
      }
    printf("%zu\n", count);
  }
  return 0;
}
```