user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x14000(%rsp),%r11
L202:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L202
  sub    $0x5a8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x14598(%rsp)
  xor    %eax,%eax
  mov    $0x1,%ebx
  mov    $0xffffffff,%r12d
  jmp    L82
L52:
  movl   $0x0,0x4(%rdx)
L130:
  add    $0x1,%rax
  add    $0x4,%rdx
  cmp    %rcx,%rax
  je     L66
L249:
  cmpb   $0x2a,(%rax)
  jne    L52
  movl   $0x1,0x4(%rdx)
  jmp    L130
L66:
  add    $0x1,%ebp
  mov    0x8(%rsp),%eax
  cmp    %ebp,%eax
  jle    L232
L122:
  lea    0x14530(%rsp),%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%r10d
  test   %r10d,%r10d
  jle    L66
  lea    0x14530(%rsp),%rax
  lea    0x1(%rbp),%edx
  movslq %edx,%rdx
  imul   $0x198,%rdx,%rdx
  lea    0x10(%rsp,%rdx,1),%rdx
  lea    -0x1(%r10),%ecx
  lea    0x14531(%rsp,%rcx,1),%rcx
  jmp    L249
L232:
  test   %eax,%eax
  jle    L168
  lea    -0x1(%r10),%edx
  lea    0x1ac(%rsp,%rdx,4),%r8
  lea    0x1a8(%rsp),%r9
  lea    0xa43c(%rsp),%r11
  lea    -0x1(%rax),%eax
  imul   $0x198,%rax,%rax
  lea    0x340(%rsp,%rax,1),%rbp
  jmp    L99
L125:
  mov    0x4(%rsi),%eax
  add    (%rsi),%eax
  add    0x8(%rsi),%eax
  add    (%rdx),%eax
  add    0x8(%rdx),%eax
  add    (%rcx),%eax
  add    0x4(%rcx),%eax
  add    0x8(%rcx),%eax
L173:
  mov    %eax,(%rdi)
  add    $0x4,%rdx
  add    $0x4,%rdi
  add    $0x4,%rsi
  add    $0x4,%rcx
  cmp    %r8,%rdx
  je     L119
L203:
  mov    %r12d,%eax
  cmpl   $0x1,0x4(%rdx)
  jne    L125
  jmp    L173
L119:
  add    $0x198,%r8
  add    $0x198,%r9
  add    $0x198,%r11
  cmp    %rbp,%r9
  je     L168
L99:
  test   %r10d,%r10d
  jle    L119
  lea    -0x198(%r9),%rsi
  lea    0x198(%r9),%rcx
  mov    %r11,%rdi
  mov    %r9,%rdx
  jmp    L203
L168:
  cmp    $0x1,%ebx
  jg     L54
L86:
  lea    0x1(%rbx),%r15d
  mov    %ebx,%esi
  lea    D7(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L93
  lea    0xa438(%rsp),%rbp
  mov    $0x1,%r14d
  lea    D32(%rip),%r13
  jmp    L40
L54:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L86
L219:
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L3:
  add    $0x1,%rbx
  cmp    %ebx,0xc(%rsp)
  jl     L62
L248:
  mov    0x0(%rbp,%rbx,4),%esi
  cmp    $0xffffffff,%esi
  jne    L219
  mov    $0x2a,%edi
  call   <putchar@plt>
  jmp    L3
L62:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x1,%r14d
  add    $0x198,%rbp
  cmp    %r14d,0x8(%rsp)
  jl     L93
L40:
  mov    $0x1,%ebx
  cmpl   $0x0,0xc(%rsp)
  jg     L248
  jmp    L62
L93:
  mov    %r15d,%ebx
L82:
  lea    0xc(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  lea    D15(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  cmp    $0x2,%eax
  jne    L273
  cmpl   $0x0,0x8(%rsp)
  je     L273
  cmpl   $0x0,0xc(%rsp)
  je     L273
  lea    0x10(%rsp),%rdi
  mov    $0xa290,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L168
  mov    $0x0,%ebp
  lea    D21(%rip),%r13
  jmp    L122
L273:
  mov    0x14598(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L303
  mov    $0x0,%eax
  add    $0x145a8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L303:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D7
data_type: string
name: extract_symbolic_data
arguments: data_label: D32
data_type: string
name: extract_symbolic_data
arguments: data_label: D15
data_type: string
name: extract_symbolic_data
arguments: data_label: D21
data_type: string

tool: D7: Field #%d:


tool: D32: %d

tool: D15: %d %d

tool: D21: %s

assistant: ```c
int main() {
  int in_field[102][102];
  int out_field[102][102];
  int n_rows, n_cols;
  int i, j, field_id;
  char line_buf[102];
  field_id = 1;
  while (scanf("%d %d", &n_rows, &n_cols) == 2 && n_rows && n_cols) {
    memset(in_field, 0, 102 * 102 * sizeof(int));
    for (i = 0; i < n_rows; i++) {
      scanf("%s", line_buf);
      for (j = 0; j < n_cols; j++) {
        if (line_buf[j] == '*')
          in_field[i + 1][j + 1] = 1;
        else
          in_field[i + 1][j + 1] = 0;
      }
    }
    for (i = 1; i <= n_rows; i++) {
      for (j = 1; j <= n_cols; j++) {
        if (in_field[i][j] == 1)
          out_field[i][j] = -1;
        else {
          out_field[i][j] = in_field[i - 1][j - 1] + in_field[i - 1][j] + in_field[i - 1][j + 1] + in_field[i][j - 1] + in_field[i][j + 1] + in_field[i + 1][j - 1] + in_field[i + 1][j] + in_field[i + 1][j + 1];
        }
      }
    }
    if (field_id > 1)
      printf("\n");
    printf("Field #%d:\n", field_id++);
    for (i = 1; i <= n_rows; i++) {
      for (j = 1; j <= n_cols; j++) {
        if (out_field[i][j] == -1)
          printf("*");
        else
          printf("%d", out_field[i][j]);
      }
      printf("\n");
    }
  }
  return 0;
}
```