user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x14000(%rsp),%r11
L6:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L6
  sub    $0x5b8,%rsp
  mov    $0x1,%ebp
  lea    D30(%rip),%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x145a8(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x18(%rsp),%rax
  mov    %rax,(%rsp)
L117:
  mov    0x8(%rsp),%rdx
  mov    (%rsp),%rsi
  xor    %eax,%eax
  lea    D27(%rip),%rdi
  call   <scanf@plt>
  cmp    $0x2,%eax
  jne    L116
  mov    0x18(%rsp),%edx
  test   %edx,%edx
  je     L116
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L116
  lea    0x20(%rsp),%rdi
  mov    $0xa290,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    0x18(%rsp),%edi
  test   %edi,%edi
  jle    L72
  lea    0x1b8(%rsp),%rbx
  xor    %r15d,%r15d
  lea    0x14540(%rsp),%r14
  mov    %rbx,%r12
  nopl   0x0(%rax,%rax,1)
L3:
  mov    %r14,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <scanf@plt>
  movslq 0x1c(%rsp),%rsi
  xor    %eax,%eax
  mov    %rsi,%r8
  test   %esi,%esi
  jle    L30
  nop
L111:
  xor    %edx,%edx
  cmpb   $0x2a,(%r14,%rax,1)
  sete   %dl
  mov    %edx,0x4(%r12,%rax,4)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L111
L30:
  mov    0x18(%rsp),%eax
  add    $0x198,%r12
  cmp    %r15d,%eax
  jg     L3
  test   %eax,%eax
  jle    L72
  sub    $0x1,%eax
  lea    -0x1(%r8),%edx
  lea    0xa44c(%rsp),%r9
  imul   $0x198,%rax,%rax
  lea    0x1bc(%rsp,%rdx,4),%rdi
  lea    0x350(%rsp,%rax,1),%r11
  cs nopw 0x0(%rax,%rax,1)
L34:
  lea    0x198(%rbx),%r10
  test   %r8d,%r8d
  jle    L156
  lea    0x198(%rbx),%r10
  lea    -0x198(%rbx),%rcx
  mov    %r9,%rsi
  mov    %r10,%rdx
L89:
  cmpl   $0x1,0x4(%rbx)
  mov    $0xffffffff,%eax
  je     L216
  mov    0x4(%rcx),%eax
  add    (%rcx),%eax
  add    0x8(%rcx),%eax
  add    (%rbx),%eax
  add    0x8(%rbx),%eax
  add    (%rdx),%eax
  add    0x4(%rdx),%eax
  add    0x8(%rdx),%eax
L216:
  add    $0x4,%rbx
  mov    %eax,(%rsi)
  add    $0x4,%rcx
  add    $0x4,%rsi
  add    $0x4,%rdx
  cmp    %rdi,%rbx
  jne    L89
L156:
  add    $0x198,%rdi
  mov    %r10,%rbx
  add    $0x198,%r9
  cmp    %r11,%r10
  jne    L34
L72:
  cmp    $0x1,%ebp
  je     L46
  mov    $0xa,%edi
  call   <putchar@plt>
L46:
  lea    0x1(%rbp),%eax
  mov    %ebp,%esi
  lea    D37(%rip),%rdi
  mov    %eax,%r15d
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%esi
  test   %esi,%esi
  jle    L90
  lea    0xa448(%rsp),%rbx
  mov    $0x1,%r12d
  lea    D13(%rip),%rbp
  nop
L136:
  mov    0x1c(%rsp),%ecx
  mov    $0x1,%r14d
  test   %ecx,%ecx
  jg     L212
  jmp    L150
L146:
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r14
  call   <printf@plt>
  cmp    %r14d,0x1c(%rsp)
  jl     L150
L212:
  mov    (%rbx,%r14,4),%esi
  cmp    $0xffffffff,%esi
  jne    L146
  mov    $0x2a,%edi
  add    $0x1,%r14
  call   <putchar@plt>
  cmp    %r14d,0x1c(%rsp)
  jge    L212
L150:
  mov    $0xa,%edi
  add    $0x1,%r12d
  add    $0x198,%rbx
  call   <putchar@plt>
  cmp    %r12d,0x18(%rsp)
  jge    L136
L90:
  mov    %r15d,%ebp
  jmp    L117
L116:
  mov    0x145a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0x145b8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D30
data_type: string
name: disassemble_data
arguments: data_tag: D27
data_type: string
name: disassemble_data
arguments: data_tag: D37
data_type: string
name: disassemble_data
arguments: data_tag: D13
data_type: string

tool: D30: %s

tool: D27: %d %d

tool: D37: Field #%d:


tool: D13: %d

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