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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    D25(%rip),%r13
  push   %r12
  mov    %r13,%rdi
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  call   <scanf@plt>
  mov    0x1c(%rsp),%edx
  test   %edx,%edx
  je     L134
  lea    0x20(%rsp),%rbp
  xor    %ebx,%ebx
  lea    0x70(%rsp),%r14
  mov    %rbp,%r12
  nopw   0x0(%rax,%rax,1)
L43:
  mov    %r12,%rsi
  mov    %r13,%rdi
  add    $0x4,%r12
  call   <scanf@plt>
  mov    -0x4(%r12),%eax
  lea    0x1(%rbx),%edx
  mov    %eax,(%r14,%rbx,4)
  add    $0x1,%rbx
  mov    %ebx,%eax
  cmp    %ebx,0x1c(%rsp)
  jne    L43
L138:
  movslq %edx,%rdx
  movl   $0x0,0x20(%rsp)
  lea    D4(%rip),%r12
  lea    D18(%rip),%r13
  movl   $0x0,0x70(%rsp)
  movl   $0x0,0x20(%rsp,%rdx,4)
  movl   $0x0,0x70(%rsp,%rdx,4)
  movl   $0x3e8,0xc(%rsp)
  test   %eax,%eax
  je     L139
  nopl   0x0(%rax,%rax,1)
L41:
  xor    %r15d,%r15d
  mov    $0x1,%ebx
  jmp    L145
  nopw   0x0(%rax,%rax,1)
L127:
  cmp    $0x1,%eax
  je     L69
L132:
  add    $0x1,%r15
  cmp    %r15d,0x1c(%rsp)
  je     L97
L145:
  mov    0x0(%rbp,%r15,4),%eax
  test   %eax,%eax
  jne    L127
  mov    %r12,%rdi
  call   <printf@plt>
  mov    0x0(%rbp,%r15,4),%eax
  cmp    $0x1,%eax
  jne    L132
L69:
  mov    %r13,%rdi
  xor    %ebx,%ebx
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %r15d,0x1c(%rsp)
  jne    L145
L97:
  lea    D23(%rip),%rdi
  call   <printf@plt>
  mov    0x1c(%rsp),%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <next_generation@plt>
  cmp    $0x1,%ebx
  je     L103
  subl   $0x1,0xc(%rsp)
  je     L7
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jne    L41
L139:
  lea    D23(%rip),%rdi
  call   <printf@plt>
  mov    0x1c(%rsp),%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <next_generation@plt>
L103:
  mov    0xc8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L135
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L7:
  xor    %eax,%eax
  jmp    L103
L134:
  xor    %eax,%eax
  lea    0x20(%rsp),%rbp
  lea    0x70(%rsp),%r14
  jmp    L138
L135:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D25
type_infered: string
name: read_data
arguments: label: D4
type_infered: string
name: read_data
arguments: label: D18
type_infered: string
name: read_data
arguments: label: D23
type_infered: string

tool: D25: %d

tool: D4: .

tool: D18: *

tool: D23: 


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