user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xe0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xd8(%rbp),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0xd4(%rbp)
  jmp    L54
L109:
  lea    -0xc0(%rbp),%rdx
  mov    -0xd4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0xd4(%rbp)
L54:
  mov    -0xd8(%rbp),%eax
  cmp    %eax,-0xd4(%rbp)
  jl     L109
  movl   $0x0,-0xcc(%rbp)
  jmp    L141
L185:
  mov    -0xcc(%rbp),%eax
  cltq
  mov    -0xc0(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L163
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L162
L163:
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L162:
  addl   $0x1,-0xcc(%rbp)
L141:
  mov    -0xd8(%rbp),%eax
  cmp    %eax,-0xcc(%rbp)
  jl     L185
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  movl   $0x0,-0xd4(%rbp)
  jmp    L111
L191:
  mov    -0xd8(%rbp),%edx
  lea    -0x60(%rbp),%rcx
  lea    -0xc0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <next_generation@plt>
  movl   $0x0,-0xd0(%rbp)
  jmp    L89
L175:
  mov    -0xd0(%rbp),%eax
  cltq
  mov    -0x60(%rbp,%rax,4),%edx
  mov    -0xd0(%rbp),%eax
  cltq
  mov    %edx,-0xc0(%rbp,%rax,4)
  mov    -0xd0(%rbp),%eax
  cltq
  movl   $0x0,-0x60(%rbp,%rax,4)
  addl   $0x1,-0xd0(%rbp)
L89:
  mov    -0xd8(%rbp),%eax
  cmp    %eax,-0xd0(%rbp)
  jl     L175
  movl   $0x0,-0xcc(%rbp)
  jmp    L176
L35:
  mov    -0xcc(%rbp),%eax
  cltq
  mov    -0xc0(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L122
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L132
L122:
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L132:
  addl   $0x1,-0xcc(%rbp)
L176:
  mov    -0xd8(%rbp),%eax
  cmp    %eax,-0xcc(%rbp)
  jl     L35
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  movl   $0x0,-0xc4(%rbp)
  movl   $0x0,-0xc8(%rbp)
  jmp    L96
L166:
  mov    -0xc8(%rbp),%eax
  cltq
  mov    -0xc0(%rbp,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L15
  addl   $0x1,-0xc4(%rbp)
L15:
  addl   $0x1,-0xc8(%rbp)
L96:
  mov    -0xd8(%rbp),%eax
  cmp    %eax,-0xc8(%rbp)
  jl     L166
  cmpl   $0x0,-0xc4(%rbp)
  je     L59
  addl   $0x1,-0xd4(%rbp)
L111:
  cmpl   $0x3e7,-0xd4(%rbp)
  jle    L191
  jmp    L4
L59:
  nop
L4:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L56
  call   <__stack_chk_fail@plt>
L56:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D4
type_guessed: string
name: read_data
arguments: label: D31
type_guessed: string
name: read_data
arguments: label: D32
type_guessed: string
name: read_data
arguments: label: D46
type_guessed: string

tool: D4: %d

tool: D31: *

tool: D32: .

tool: D46: 


assistant: ```c
int main() {
  int current[21];
  int next[21];
  int length;
  scanf("%d", &length);
  int i, i1, 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;
    }
  }
}
```