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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xd0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xc4(%rbp),%rax
  mov    %rax,%rsi
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xc4(%rbp),%eax
  cmp    $0x14,%eax
  jle    L1
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L51
L1:
  mov    -0xc4(%rbp),%eax
  test   %eax,%eax
  jg     L92
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L51
L92:
  movl   $0x0,-0xb8(%rbp)
  jmp    L225
L102:
  lea    -0xc0(%rbp),%rax
  mov    %rax,%rsi
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xc0(%rbp),%eax
  test   %eax,%eax
  je     L3
  mov    -0xc0(%rbp),%eax
  cmp    $0x1,%eax
  jne    L24
L3:
  cmpl   $0x0,-0xb8(%rbp)
  je     L179
  mov    -0xc4(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xb8(%rbp)
  jne    L222
L179:
  mov    -0xc0(%rbp),%eax
  cmp    $0x1,%eax
  jne    L222
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L51
L222:
  mov    -0xc0(%rbp),%edx
  mov    -0xb8(%rbp),%eax
  cltq
  mov    %edx,-0xb0(%rbp,%rax,4)
  addl   $0x1,-0xb8(%rbp)
  jmp    L225
L24:
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L51
L225:
  mov    -0xc4(%rbp),%eax
  cmp    %eax,-0xb8(%rbp)
  jl     L102
  movl   $0x0,-0xb8(%rbp)
  jmp    L105
L194:
  movl   $0x0,-0xbc(%rbp)
  movl   $0x0,-0xb4(%rbp)
  jmp    L135
L176:
  mov    -0xb4(%rbp),%eax
  cltq
  mov    -0xb0(%rbp,%rax,4),%eax
  test   %eax,%eax
  jne    L108
  addl   $0x1,-0xbc(%rbp)
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L155
L108:
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L155:
  addl   $0x1,-0xb4(%rbp)
L135:
  mov    -0xc4(%rbp),%eax
  cmp    %eax,-0xb4(%rbp)
  jl     L176
  lea    D81(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0xc4(%rbp),%eax
  cmp    %eax,-0xbc(%rbp)
  je     L210
  mov    -0xc4(%rbp),%edx
  lea    -0x60(%rbp),%rcx
  lea    -0xb0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <next_generation@plt>
  addl   $0x1,-0xb8(%rbp)
L105:
  cmpl   $0x3e7,-0xb8(%rbp)
  jle    L194
  jmp    L153
L210:
  nop
L153:
  mov    $0x0,%eax
L51:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L209
  call   <__stack_chk_fail@plt>
L209:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D32
data_type: string
name: parse_data
arguments: data_label: D54
data_type: string
name: parse_data
arguments: data_label: D53
data_type: string
name: parse_data
arguments: data_label: D19
data_type: string
name: parse_data
arguments: data_label: D82
data_type: string
name: parse_data
arguments: data_label: D16
data_type: string
name: parse_data
arguments: data_label: D4
data_type: string
name: parse_data
arguments: data_label: D81
data_type: string

tool: D32: %d

tool: D54: Length should be max 20!

tool: D53: Length should be 1 at least!

tool: D19: 
First and last cell should always be 0!

tool: D82: 
Expected 0 or 1!

tool: D16: .

tool: D4: *

tool: D81: 


assistant: ```c
int main() {
  int length, n, current[20], next[20], countforZeros, i, j;
  scanf("%d", &length);
  if (length > 20) {
    printf("Length should be max 20!");
    return 1;
  }
  if (length <= 0) {
    printf("Length should be 1 at least!");
    return 1;
  }
  for (i = 0; i < length; i++) {
    scanf("%d", &n);
    if (n == 0 || n == 1) {
      if ((i == 0 || i == (length - 1)) && n == 1) {
        printf("\nFirst and last cell should always be 0!");
        return 1;
      }
      current[i] = n;
    } else {
      printf("\nExpected 0 or 1!");
      return 1;
    }
  }
  for (i = 0; i < 1000; i++) {
    countforZeros = 0;
    for (j = 0; j < length; j++) {
      if (current[j] == 0) {
        countforZeros++;
        printf(".");
      } else
        printf("*");
    }
    printf("\n");
    if (countforZeros == length)
      break;
    next_generation(current, next, length);
  }
  return 0;
}
```