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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  lea    D71(%rip),%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  lea    -0x3c(%rbp),%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  nop
L77:
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  mov    -0x3c(%rbp),%eax
  cmp    $0x14,%eax
  ja     L77
  movslq %eax,%rdx
  mov    %rsp,%rsi
  lea    0xf(,%rdx,4),%rdx
  mov    %rdx,%rdi
  mov    %rdx,%rcx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L147
L42:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L42
L147:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L124
L35:
  mov    %rdx,%rcx
  mov    %rsp,%rsi
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%r12
  and    $0xfffffffffffffff0,%rcx
  sub    %rdx,%rsi
L192:
  cmp    %rsi,%rsp
  je     L201
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L192
L124:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L35
L201:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L134
L197:
  mov    %rsp,%rbx
  test   %eax,%eax
  je     L58
  mov    %r12,%r14
  xor    %r13d,%r13d
  nopw   0x0(%rax,%rax,1)
L112:
  mov    %r14,%rsi
  mov    %r15,%rdi
  add    $0x1,%r13d
  add    $0x4,%r14
  call   <scanf@plt>
  cmp    %r13d,-0x3c(%rbp)
  jg     L112
L58:
  lea    D59(%rip),%rdi
  call   <printf@plt>
  mov    -0x3c(%rbp),%esi
  test   %esi,%esi
  jle    L231
  xor    %r13d,%r13d
  lea    D9(%rip),%r14
  lea    D46(%rip),%r15
  jmp    L145
  nopw   0x0(%rax,%rax,1)
L238:
  mov    %r15,%rdi
  add    $0x1,%r13
  call   <printf@plt>
  cmp    %r13d,-0x3c(%rbp)
  jle    L231
L145:
  mov    (%r12,%r13,4),%ecx
  test   %ecx,%ecx
  jne    L238
  mov    %r14,%rdi
  add    $0x1,%r13
  call   <printf@plt>
  cmp    %r13d,-0x3c(%rbp)
  jg     L145
L231:
  lea    D59(%rip),%rdi
  lea    D9(%rip),%r14
  call   <printf@plt>
  movl   $0x4,-0x44(%rbp)
  lea    D46(%rip),%r13
L80:
  mov    -0x3c(%rbp),%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <check_generation@plt>
  test   %rax,%rax
  je     L161
  mov    -0x3c(%rbp),%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <next_generation@plt>
  mov    -0x3c(%rbp),%edx
  test   %edx,%edx
  jle    L146
  xor    %r15d,%r15d
  jmp    L3
  nopw   0x0(%rax,%rax,1)
L188:
  mov    %r13,%rdi
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %r15d,-0x3c(%rbp)
  jle    L146
L3:
  mov    (%rbx,%r15,4),%eax
  test   %eax,%eax
  jne    L188
  mov    %r14,%rdi
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %r15d,-0x3c(%rbp)
  jg     L3
L146:
  lea    D59(%rip),%rdi
  call   <printf@plt>
  mov    -0x3c(%rbp),%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <strcpy_int@plt>
  subl   $0x1,-0x44(%rbp)
  jne    L80
L161:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L184
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L134:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L197
L184:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D71
type: string
name: read_data
arguments: tag: D59
type: string
name: read_data
arguments: tag: D9
type: string
name: read_data
arguments: tag: D46
type: string

tool: D71: %d

tool: D59: 


tool: D9: .

tool: D46: *

assistant: ```c
int main() {
  int array_lenght;
  do {
    scanf("%d", &array_lenght);
  } while (array_lenght < 0 || array_lenght > 20);
  int current[array_lenght];
  int next[array_lenght];
  int count, count_print;
  for (count = 0; count < array_lenght; count++)
    scanf("%d", &current[count]);
  printf("\n");
  for (count_print = 0; count_print < array_lenght; count_print++) {
    if (current[count_print])
      printf("*");
    else
      printf(".");
  }
  printf("\n");
  for (count = 0; count < 4 && check_generation(current, next, array_lenght); count++) {
    next_generation(current, next, array_lenght);
    for (count_print = 0; count_print < array_lenght; count_print++) {
      if (next[count_print])
        printf("*");
      else
        printf(".");
    }
    printf("\n");
    strcpy_int(current, next, array_lenght);
  }
  return 0;
}
```