user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xb8(%rbp)
  movl   $0x1,-0xb4(%rbp)
  lea    -0xc0(%rbp),%rax
  mov    %rax,%rsi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0xbc(%rbp)
  jmp    L23
L35:
  lea    -0xb0(%rbp),%rdx
  mov    -0xbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D11(%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)
L23:
  mov    -0xc0(%rbp),%eax
  cmp    %eax,-0xbc(%rbp)
  jne    L35
  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)
  jmp    L76
L40:
  movl   $0x0,-0xbc(%rbp)
  jmp    L66
L38:
  mov    -0xbc(%rbp),%eax
  cltq
  mov    -0xb0(%rbp,%rax,4),%eax
  test   %eax,%eax
  jne    L9
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L9:
  mov    -0xbc(%rbp),%eax
  cltq
  mov    -0xb0(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L50
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  movl   $0x0,-0xb4(%rbp)
L50:
  addl   $0x1,-0xbc(%rbp)
L66:
  mov    -0xc0(%rbp),%eax
  cmp    %eax,-0xbc(%rbp)
  jne    L38
  lea    D18(%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)
  jne    L86
  mov    $0x0,%eax
  jmp    L60
L86:
  movl   $0x1,-0xb4(%rbp)
L76:
  cmpl   $0x3e8,-0xb8(%rbp)
  jne    L40
  mov    $0x0,%eax
L60:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L30
  call   <__stack_chk_fail@plt>
L30:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D11
type_infered: string
name: read_data
arguments: label: D8
type_infered: string
name: read_data
arguments: label: D0
type_infered: string
name: read_data
arguments: label: D18
type_infered: string

tool: D11: %d

tool: D8: .

tool: D0: *

tool: D18: 


assistant: ```c
int main(void) {
  int old_cells[20];
  int new_cells[20];
  int limiter;
  int counter;
  int generation_counter = 0;
  int deadflag = 1;
  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;
  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 0;
    }
    deadflag = 1;
  }
  return 0;
}
```