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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x31000(%rsp),%r11
L66:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L66
  sub    $0x7e0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x317c0(%rbp)
  movq   $0x0,-0x317b8(%rbp)
L83:
  lea    -0xa0(%rbp),%rax
  mov    %rax,%rdi
  call   <gets@plt>
  lea    -0x317d8(%rbp),%rcx
  lea    -0x317e0(%rbp),%rdx
  lea    -0xa0(%rbp),%rax
  lea    D10(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0x317e0(%rbp),%rax
  test   %rax,%rax
  jne    L171
  mov    -0x317d8(%rbp),%rax
  test   %rax,%rax
  jne    L171
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L169
  jmp    L134
L171:
  lea    -0x2bfc0(%rbp),%rax
  mov    $0x2bf20,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movq   $0x0,-0x317d0(%rbp)
  jmp    L39
L108:
  lea    -0x317b0(%rbp),%rdx
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <gets@plt>
  addq   $0x1,-0x317d0(%rbp)
L39:
  mov    -0x317e0(%rbp),%rax
  cmp    %rax,-0x317d0(%rbp)
  jl     L108
  movq   $0x0,-0x317d0(%rbp)
  jmp    L192
L151:
  movq   $0x0,-0x317c8(%rbp)
  jmp    L8
L45:
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rax
  lea    0x0(%rbp,%rax,1),%rdx
  mov    -0x317c8(%rbp),%rax
  add    %rdx,%rax
  sub    $0x317b0,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L56
  mov    -0x317c8(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rax
  add    %rcx,%rax
  mov    -0x2bfc0(%rbp,%rax,8),%rax
  lea    0x1(%rax),%rdx
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rax
  add    %rcx,%rax
  mov    %rdx,-0x2bfc0(%rbp,%rax,8)
  mov    -0x317d0(%rbp),%rax
  add    $0x1,%rax
  mov    -0x317c8(%rbp),%rdx
  lea    0x1(%rdx),%rcx
  imul   $0x96,%rax,%rdx
  add    %rcx,%rdx
  mov    -0x2bfc0(%rbp,%rdx,8),%rdx
  add    $0x1,%rdx
  imul   $0x96,%rax,%rax
  add    %rcx,%rax
  mov    %rdx,-0x2bfc0(%rbp,%rax,8)
  mov    -0x317d0(%rbp),%rax
  add    $0x1,%rax
  imul   $0x96,%rax,%rcx
  mov    -0x317c8(%rbp),%rdx
  add    %rcx,%rdx
  mov    -0x2bfc0(%rbp,%rdx,8),%rdx
  add    $0x1,%rdx
  imul   $0x96,%rax,%rcx
  mov    -0x317c8(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,-0x2bfc0(%rbp,%rax,8)
  mov    -0x317d0(%rbp),%rax
  add    $0x1,%rax
  mov    -0x317c8(%rbp),%rdx
  lea    -0x1(%rdx),%rcx
  imul   $0x96,%rax,%rdx
  add    %rcx,%rdx
  mov    -0x2bfc0(%rbp,%rdx,8),%rdx
  add    $0x1,%rdx
  imul   $0x96,%rax,%rax
  add    %rcx,%rax
  mov    %rdx,-0x2bfc0(%rbp,%rax,8)
  mov    -0x317c8(%rbp),%rax
  lea    -0x1(%rax),%rcx
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rax
  add    %rcx,%rax
  mov    -0x2bfc0(%rbp,%rax,8),%rax
  lea    0x1(%rax),%rdx
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rax
  add    %rcx,%rax
  mov    %rdx,-0x2bfc0(%rbp,%rax,8)
  mov    -0x317d0(%rbp),%rax
  sub    $0x1,%rax
  mov    -0x317c8(%rbp),%rdx
  lea    -0x1(%rdx),%rcx
  imul   $0x96,%rax,%rdx
  add    %rcx,%rdx
  mov    -0x2bfc0(%rbp,%rdx,8),%rdx
  add    $0x1,%rdx
  imul   $0x96,%rax,%rax
  add    %rcx,%rax
  mov    %rdx,-0x2bfc0(%rbp,%rax,8)
  mov    -0x317d0(%rbp),%rax
  sub    $0x1,%rax
  imul   $0x96,%rax,%rcx
  mov    -0x317c8(%rbp),%rdx
  add    %rcx,%rdx
  mov    -0x2bfc0(%rbp,%rdx,8),%rdx
  add    $0x1,%rdx
  imul   $0x96,%rax,%rcx
  mov    -0x317c8(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,-0x2bfc0(%rbp,%rax,8)
  mov    -0x317d0(%rbp),%rax
  sub    $0x1,%rax
  mov    -0x317c8(%rbp),%rdx
  lea    0x1(%rdx),%rcx
  imul   $0x96,%rax,%rdx
  add    %rcx,%rdx
  mov    -0x2bfc0(%rbp,%rdx,8),%rdx
  add    $0x1,%rdx
  imul   $0x96,%rax,%rax
  add    %rcx,%rax
  mov    %rdx,-0x2bfc0(%rbp,%rax,8)
L56:
  addq   $0x1,-0x317c8(%rbp)
L8:
  mov    -0x317d8(%rbp),%rax
  cmp    %rax,-0x317c8(%rbp)
  jl     L45
  addq   $0x1,-0x317d0(%rbp)
L192:
  mov    -0x317e0(%rbp),%rax
  cmp    %rax,-0x317d0(%rbp)
  jl     L151
  cmpq   $0x1,-0x317b8(%rbp)
  jne    L79
  mov    $0xa,%edi
  call   <putchar@plt>
L79:
  movq   $0x1,-0x317b8(%rbp)
  addq   $0x1,-0x317c0(%rbp)
  mov    -0x317c0(%rbp),%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movq   $0x0,-0x317d0(%rbp)
  jmp    L198
L14:
  movq   $0x0,-0x317c8(%rbp)
  jmp    L142
L30:
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rax
  lea    0x0(%rbp,%rax,1),%rdx
  mov    -0x317c8(%rbp),%rax
  add    %rdx,%rax
  sub    $0x317b0,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L35
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rax
  lea    0x0(%rbp,%rax,1),%rdx
  mov    -0x317c8(%rbp),%rax
  add    %rdx,%rax
  sub    $0x317b0,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  jmp    L136
L35:
  mov    -0x317d0(%rbp),%rax
  imul   $0x96,%rax,%rdx
  mov    -0x317c8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x2bfc0(%rbp,%rax,8),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L136:
  addq   $0x1,-0x317c8(%rbp)
L142:
  mov    -0x317d8(%rbp),%rax
  cmp    %rax,-0x317c8(%rbp)
  jl     L30
  mov    $0xa,%edi
  call   <putchar@plt>
  addq   $0x1,-0x317d0(%rbp)
L198:
  mov    -0x317e0(%rbp),%rax
  cmp    %rax,-0x317d0(%rbp)
  jl     L14
  jmp    L83
L134:
  call   <__stack_chk_fail@plt>
L169:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D10
type_guessed: string
name: parse_data
arguments: data_label: D17
type_guessed: string
name: parse_data
arguments: data_label: D4
type_guessed: string

tool: D10: %ld%ld

tool: D17: Field #%ld:


tool: D4: %ld

assistant: ```c
int main() {
  char a[150][150], c[150];
  long int i, j, l = 0, n, m, flag = 0;
  while (1) {
    gets(c);
    sscanf(c, "%ld%ld", &n, &m);
    if (n == 0 && m == 0)
      break;
    long b[150][150] = {0};
    for (i = 0; i < n; i++)
      gets(a[i]);
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) {
        if (a[i][j] == '*') {
          b[i][j + 1]++;
          b[i + 1][j + 1]++;
          b[i + 1][j]++;
          b[i + 1][j - 1]++;
          b[i][j - 1]++;
          b[i - 1][j - 1]++;
          b[i - 1][j]++;
          b[i - 1][j + 1]++;
        }
      }
    }
    if (flag == 1)
      printf("\n");
    flag = 1;
    printf("Field #%ld:\n", ++l);
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) {
        if (a[i][j] == '*')
          printf("%c", a[i][j]);
        else
          printf("%ld", b[i][j]);
      }
      printf("\n");
    }
  }
  return 0;
}
```