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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    -0x3c(%rbp),%rsi
  push   %r13
  lea    D19(%rip),%r13
  push   %r12
  mov    %r13,%rdi
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <scanf@plt>
  movslq -0x3c(%rbp),%rax
  mov    %rsp,%rsi
  mov    %rax,%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rdx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L202
L182:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L182
L202:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L95
L255:
  lea    0x3(%rsp),%r12
  mov    %rsp,%rsi
  mov    %r12,%rdx
  and    $0xfffffffffffffffc,%r12
  shr    $0x2,%rdx
  mov    %rdx,-0x48(%rbp)
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  and    $0xfffffffffffffff0,%rdx
  sub    %rax,%rsi
L66:
  cmp    %rsi,%rsp
  je     L118
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L66
L95:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L255
L118:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L73
L90:
  mov    %rsp,%r14
  nopw   0x0(%rax,%rax,1)
L259:
  test   %ecx,%ecx
  jle    L218
  mov    %r12,%r15
  xor    %ebx,%ebx
  nopl   (%rax)
L214:
  mov    %r15,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebx
  add    $0x4,%r15
  call   <scanf@plt>
  mov    -0x3c(%rbp),%ecx
  cmp    %ebx,%ecx
  jg     L214
  mov    (%r12),%r8d
  test   %r8d,%r8d
  jne    L259
  lea    -0x1(%rcx),%eax
  cltq
  mov    (%r12,%rax,4),%edi
  test   %edi,%edi
  jne    L259
L198:
  mov    $0x3e8,%r13d
  lea    D6(%rip),%r15
  nopl   0x0(%rax)
L179:
  xor    %ebx,%ebx
  test   %ecx,%ecx
  jle    L97
  xchg   %ax,%ax
L110:
  mov    (%r12,%rbx,4),%r9d
  test   %r9d,%r9d
  jne    L169
  mov    $0x2e,%edi
  add    $0x1,%rbx
  call   <putchar@plt>
  cmp    %ebx,-0x3c(%rbp)
  jg     L110
L97:
  mov    %r15,%rdi
  call   <puts@plt>
  mov    -0x3c(%rbp),%esi
  mov    %r12,%rdi
  call   <checkAlive@plt>
  mov    -0x3c(%rbp),%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <next_generation@plt>
  mov    -0x3c(%rbp),%ecx
  lea    -0x1(%rcx),%eax
  cltq
  movl   $0x0,(%r14,%rax,4)
  movl   $0x0,(%r14)
  test   %ecx,%ecx
  jle    L11
  movslq %ecx,%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    %ecx,-0x48(%rbp)
  shl    $0x2,%rdx
  call   <memcpy@plt>
  mov    -0x48(%rbp),%ecx
L11:
  cmp    $0x1,%ebx
  jne    L243
  sub    $0x1,%r13d
  jne    L179
L243:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L230
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   (%rax)
L169:
  mov    $0x2a,%edi
  add    $0x1,%rbx
  call   <putchar@plt>
  cmp    %ebx,-0x3c(%rbp)
  jg     L110
  jmp    L97
  nopl   0x0(%rax)
L218:
  mov    -0x48(%rbp),%rax
  mov    0x0(,%rax,4),%edx
  lea    -0x1(%rcx),%eax
  test   %edx,%edx
  jne    L146
  movslq %eax,%rsi
  mov    (%r12,%rsi,4),%esi
  test   %esi,%esi
  je     L198
L146:
  cltq
L15:
  test   %edx,%edx
  jne    L15
L150:
  mov    (%r12,%rax,4),%r10d
  test   %r10d,%r10d
  jne    L150
  jmp    L198
L73:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L90
L230:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D19
type_guessed: string
name: retrieve_data
arguments: data_tag: D6
type_guessed: string

tool: D19: %d

tool: D6:  

assistant: ```c
int main() {
  int n;
  scanf("%d", &n);
  int current[n], next[n];
retry:
  for (int i = 0; i < n; i++)
    scanf("%d", &current[i]);
  if (current[0] != 0 || current[n - 1] != 0)
    goto retry;
  int proverka;
  for (int j = 0; j < 1000; j++) {
    proverka = 0;
    for (int i = 0; i < n; i++)
      printf("%c", (current[i] == 0) ? '.' : '*');
    printf(" \n");
    proverka = checkAlive(current, n);
    next_generation(current, next, n);
    next[0] = next[n - 1] = 0;
    for (int i = 0; i < n; i++)
      current[i] = next[i];
    if (proverka != 1)
      break;
  }
}
```