user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    D11(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rbx
  mov    %rbx,%rsi
  jmp    L74
  nopl   0x0(%rax)
L117:
  mov    %rbx,%rsi
L74:
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    0x1c(%rsp),%ecx
  cmp    $0x14,%ecx
  ja     L117
  lea    0x20(%rsp),%rbx
  nopl   0x0(%rax)
L176:
  test   %ecx,%ecx
  jle    L53
L63:
  mov    %rbx,%r12
  xor    %ebp,%ebp
  nopl   0x0(%rax)
L236:
  mov    %r12,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebp
  add    $0x4,%r12
  call   <scanf@plt>
  mov    0x1c(%rsp),%ecx
  cmp    %ebp,%ecx
  jg     L236
  mov    0x20(%rsp),%edi
  test   %edi,%edi
  jne    L176
  lea    -0x1(%rcx),%eax
  cltq
  mov    0x20(%rsp,%rax,4),%eax
  test   %eax,%eax
  je     L175
  test   %ecx,%ecx
  jg     L63
L53:
  mov    0x20(%rsp),%edx
  lea    -0x1(%rcx),%eax
  test   %edx,%edx
  jne    L49
  movslq %eax,%rsi
  mov    0x20(%rsp,%rsi,4),%esi
  test   %esi,%esi
  jne    L49
L175:
  movl   $0x3e8,0xc(%rsp)
  lea    D26(%rip),%r14
  lea    0x70(%rsp),%r15
  lea    D29(%rip),%r12
  lea    D8(%rip),%rbp
  nopl   0x0(%rax,%rax,1)
L78:
  xor    %r13d,%r13d
  cmp    $0x1,%ecx
  jle    L200
L100:
  mov    (%rbx,%r13,4),%r10d
  mov    %rbp,%rdi
  test   %r10d,%r10d
  je     L218
  mov    %r12,%rdi
L218:
  call   <printf@plt>
  mov    0x1c(%rsp),%eax
  add    $0x1,%r13
  sub    $0x1,%eax
  cmp    %r13d,%eax
  jg     L100
L200:
  mov    %r14,%rdi
  call   <printf@plt>
  mov    0x1c(%rsp),%edx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <next_generation@plt>
  mov    0x1c(%rsp),%ecx
  cmp    $0x1,%ecx
  jle    L41
  lea    -0x2(%rcx),%edx
  mov    %rbx,%rax
  lea    0x24(%rsp,%rdx,4),%rdx
  jmp    L125
  nopl   (%rax)
L5:
  add    $0x4,%rax
  cmp    %rax,%rdx
  je     L104
L125:
  mov    (%rax),%r9d
  test   %r9d,%r9d
  je     L5
  subl   $0x1,0xc(%rsp)
  jne    L78
L42:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L111
  add    $0xd8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L49:
  cltq
L177:
  test   %edx,%edx
  jne    L177
L37:
  mov    0x20(%rsp,%rax,4),%r11d
  test   %r11d,%r11d
  jne    L37
  jmp    L175
  nopl   0x0(%rax)
L104:
  xor    %ebp,%ebp
  lea    D29(%rip),%r13
  lea    D8(%rip),%r12
L87:
  mov    (%rbx,%rbp,4),%r8d
  mov    %r12,%rdi
  test   %r8d,%r8d
  je     L189
  mov    %r13,%rdi
L189:
  call   <printf@plt>
  mov    0x1c(%rsp),%eax
  add    $0x1,%rbp
  sub    $0x1,%eax
  cmp    %ebp,%eax
  jg     L87
L41:
  mov    %r14,%rdi
  call   <printf@plt>
  jmp    L42
L111:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D11
type_infered: string
name: disassemble_data
arguments: data_label: D26
type_infered: string
name: disassemble_data
arguments: data_label: D29
type_infered: string
name: disassemble_data
arguments: data_label: D8
type_infered: string

tool: D11: %d

tool: D26:  


tool: D29: *

tool: D8: .

assistant: ```c
int main() {
  int n, j, i, check, current[20], next[20];
  scanf("%d", &n);
  while (n < 0 || n > 20) {
    scanf("%d", &n);
  }
  do {
    for (i = 0; i < n; i++) {
      scanf("%d", &current[i]);
    }
  } while (current[0] != 0 || current[n - 1] != 0);
  for (j = 0; j < 1000; j++) {
    check = 0;
    for (i = 0; i < n - 1; i++) {
      if (current[i] == 0) {
        printf(".");
      } else {
        printf("*");
      }
    }
    printf(" \n");
    next_generation(&next[0], &current[0], n);
    for (i = 0; i < n - 1; i++) {
      if (current[i] != 0) {
        check = 1;
        break;
      }
    }
    if (check != 1) {
      for (i = 0; i < n - 1; i++) {
        if (current[i] == 0) {
          printf(".");
        } else {
          printf("*");
        }
      }
      printf(" \n");
      break;
    }
  }
}
```