user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    D35(%rip),%r13
  push   %r12
  mov    %r13,%rdi
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0xe8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xd8(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  lea    0x20(%rsp),%rbx
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  mov    %rbx,%r12
  test   %eax,%eax
  jle    L29
  xchg   %ax,%ax
L23:
  mov    %r12,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebp
  add    $0x4,%r12
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  cmp    %ebp,%eax
  jg     L23
  test   %eax,%eax
  jle    L29
  xor    %ebp,%ebp
  lea    D5(%rip),%r12
  lea    D40(%rip),%r13
  jmp    L156
L66:
  mov    %r12,%rdi
  add    $0x1,%rbp
  call   <printf@plt>
  cmp    %ebp,0x1c(%rsp)
  jle    L29
L156:
  cmpl   $0x1,(%rbx,%rbp,4)
  jne    L66
  mov    %r13,%rdi
  add    $0x1,%rbp
  call   <printf@plt>
  cmp    %ebp,0x1c(%rsp)
  jg     L156
L29:
  lea    D0(%rip),%r15
  lea    0x80(%rsp),%r13
  mov    %r15,%rdi
  lea    D5(%rip),%rbp
  lea    D40(%rip),%r14
  call   <printf@plt>
  movl   $0x3e8,0xc(%rsp)
  mov    0x1c(%rsp),%r8d
  nopl   0x0(%rax)
L43:
  mov    %r8d,%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <next_generation@plt>
  movslq 0x1c(%rsp),%rdx
  test   %edx,%edx
  jle    L40
  lea    0x0(,%rdx,4),%r12
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    %r12,%rdx
  call   <memcpy@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  xor    %r12d,%r12d
  jmp    L58
  nop
L92:
  mov    %rbp,%rdi
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %r12d,0x1c(%rsp)
  jle    L40
L58:
  cmpl   $0x1,(%rbx,%r12,4)
  jne    L92
  mov    %r14,%rdi
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %r12d,0x1c(%rsp)
  jg     L58
L40:
  mov    %r15,%rdi
  call   <printf@plt>
  mov    0x1c(%rsp),%r8d
  test   %r8d,%r8d
  jle    L55
  lea    -0x1(%r8),%edx
  mov    %rbx,%rax
  lea    0x24(%rsp,%rdx,4),%rsi
  xor    %edx,%edx
  nopl   (%rax)
L120:
  xor    %ecx,%ecx
  cmpl   $0x1,(%rax)
  sete   %cl
  add    $0x4,%rax
  add    %ecx,%edx
  cmp    %rax,%rsi
  jne    L120
  test   %edx,%edx
  je     L55
  subl   $0x1,0xc(%rsp)
  jne    L43
  nopw   0x0(%rax,%rax,1)
L55:
  mov    0xd8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L69
  add    $0xe8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L69:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D35
datatype: string
name: retrieve_data
arguments: label: D5
datatype: string
name: retrieve_data
arguments: label: D40
datatype: string
name: retrieve_data
arguments: label: D0
datatype: string

tool: D35: %d

tool: D5: .

tool: D40: *

tool: D0: 


assistant: ```c
int main() {
  int current[21];
  int next[21];
  int length;
  scanf("%d", &length);
  int i, i1, i2, i3, i4;
  for (i = 0; i < length; i++) {
    scanf("%d", &current[i]);
  }
  for (i3 = 0; i3 < length; i3++) {
    if (current[i3] == 1) {
      printf("*");
    } else {
      printf(".");
    }
  }
  printf("\n");
  for (i = 0; i < 1000; i++) {
    next_generation(current, next, length);
    for (i1 = 0; i1 < length; i1++) {
      current[i1] = next[i1];
      next[i1] = 0;
    }
    for (i3 = 0; i3 < length; i3++) {
      if (current[i3] == 1) {
        printf("*");
      } else {
        printf(".");
      }
    }
    printf("\n");
    int number = 0;
    for (i4 = 0; i4 < length; i4++) {
      if (current[i4] == 1) {
        number++;
      }
    }
    if (number == 0) {
      break;
    }
  }
}
```