user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xc0(%rbp),%rax
  mov    %rax,%rsi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0xbc(%rbp)
  jmp    L108
L66:
  lea    -0xb0(%rbp),%rdx
  mov    -0xbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xbc(%rbp),%eax
  cltq
  mov    -0xb0(%rbp,%rax,4),%edx
  mov    -0xbc(%rbp),%eax
  cltq
  mov    %edx,-0x60(%rbp,%rax,4)
  addl   $0x1,-0xbc(%rbp)
L108:
  mov    -0xc0(%rbp),%eax
  cmp    %eax,-0xbc(%rbp)
  jne    L66
  movl   $0x0,-0xb0(%rbp)
  mov    -0xbc(%rbp),%eax
  cltq
  movl   $0x0,-0xb0(%rbp,%rax,4)
  movl   $0x0,-0x60(%rbp)
  mov    -0xbc(%rbp),%eax
  cltq
  movl   $0x0,-0x60(%rbp,%rax,4)
  movl   $0x0,-0xb8(%rbp)
  movl   $0x1,-0xb4(%rbp)
  jmp    L101
L84:
  movl   $0x0,-0xbc(%rbp)
  jmp    L0
L60:
  mov    -0xbc(%rbp),%eax
  cltq
  mov    -0xb0(%rbp,%rax,4),%eax
  test   %eax,%eax
  jne    L54
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L54:
  mov    -0xbc(%rbp),%eax
  cltq
  mov    -0xb0(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L51
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  movl   $0x0,-0xb4(%rbp)
L51:
  addl   $0x1,-0xbc(%rbp)
L0:
  mov    -0xc0(%rbp),%eax
  cmp    %eax,-0xbc(%rbp)
  jne    L60
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0xc0(%rbp),%edx
  lea    -0x60(%rbp),%rcx
  lea    -0xb0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <next_generation@plt>
  addl   $0x1,-0xb8(%rbp)
  cmpl   $0x1,-0xb4(%rbp)
  je     L39
  movl   $0x1,-0xb4(%rbp)
L101:
  cmpl   $0x3e8,-0xb8(%rbp)
  jne    L84
  mov    $0x0,%eax
  jmp    L100
L39:
  nop
  nop
L100:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L15
  call   <__stack_chk_fail@plt>
L15:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D41
datatype: string
name: unpack_data
arguments: data_label: D3
datatype: string
name: unpack_data
arguments: data_label: D42
datatype: string
name: unpack_data
arguments: data_label: D39
datatype: string

tool: D41: %d

tool: D3: .

tool: D42: *

tool: D39: 


assistant: ```c
int main(void) {
  int old_cells[20];
  int new_cells[20];
  int limiter;
  int counter;
  scanf("%d", &limiter);
  counter = 0;
  while (counter != limiter) {
    scanf("%d", &old_cells[counter]);
    new_cells[counter] = old_cells[counter];
    counter++;
  }
  old_cells[0] = 0;
  old_cells[counter] = 0;
  new_cells[0] = 0;
  new_cells[counter] = 0;
  int generation_counter = 0;
  int deadflag = 1;
  while (generation_counter != 1000) {
    counter = 0;
    while (counter != limiter) {
      if (old_cells[counter] == 0) {
        printf(".");
      }
      if (old_cells[counter] == 1) {
        printf("*");
        deadflag = 0;
      }
      counter++;
    }
    printf("\n");
    next_generation(old_cells, new_cells, limiter);
    generation_counter++;
    if (deadflag == 1) {
      return;
    }
    deadflag = 1;
  }
}
```