user: 请将以下的汇编代码转换成C语言代码：

```asm
<next_generation>:
  endbr64
  push   %r15
  movslq %edx,%rax
  mov    %rdi,%r15
  push   %r14
  lea    D7(%rip),%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  lea    -0x1(%rax),%esi
  push   %rbp
  mov    %rax,%rbp
  lea    -0x4(%r12,%rax,4),%rax
  push   %rbx
  mov    %ebp,%ecx
  and    $0xfffffffc,%ecx
  sub    $0x78,%rsp
  mov    %rax,0x20(%rsp)
  mov    %esi,%eax
  lea    0x4(%rdi,%rax,4),%rbx
  mov    %rax,0x68(%rsp)
  mov    %ebp,%eax
  shr    $0x2,%eax
  mov    %esi,0x8(%rsp)
  sub    $0x1,%eax
  mov    %ecx,0xc(%rsp)
  mov    %rax,%rdx
  movl   $0x3e8,0x10(%rsp)
  shl    $0x4,%rdx
  lea    0x10(%rdi,%rdx,1),%rdi
  mov    %r15,%rdx
  mov    %rdi,0x18(%rsp)
  lea    0x4(%r12),%rdi
  sub    %rdi,%rdx
  cmp    $0x8,%rdx
  seta   %dil
  cmp    $0x2,%esi
  seta   %dl
  add    $0x1,%rax
  shl    $0x4,%rax
  and    %edx,%edi
  mov    %rax,0x28(%rsp)
  movslq %ecx,%rax
  shl    $0x2,%rax
  mov    %dil,0x17(%rsp)
  lea    (%r12,%rax,1),%rsi
  add    %r15,%rax
  mov    %rax,0x38(%rsp)
  lea    0x1(%rcx),%eax
  mov    %eax,0x40(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rsi,0x30(%rsp)
  lea    (%r12,%rax,1),%rsi
  add    %r15,%rax
  mov    %rax,0x48(%rsp)
  lea    0x2(%rcx),%eax
  mov    %eax,0x44(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rsi,0x50(%rsp)
  lea    (%r12,%rax,1),%rdi
  add    %r15,%rax
  mov    %rdi,0x58(%rsp)
  mov    %rax,0x60(%rsp)
  nopl   (%rax)
L47:
  lea    D9(%rip),%rdi
  call   <printf@plt>
  test   %ebp,%ebp
  je     L26
  mov    %r15,%r13
  jmp    L56
  nopl   0x0(%rax)
L76:
  cmp    $0x1,%eax
  je     L247
L246:
  add    $0x4,%r13
  cmp    %r13,%rbx
  je     L169
L56:
  mov    0x0(%r13),%eax
  test   %eax,%eax
  jne    L76
  mov    %r14,%rdi
  call   <printf@plt>
  mov    0x0(%r13),%eax
  cmp    $0x1,%eax
  jne    L246
L247:
  lea    D0(%rip),%rdi
  add    $0x4,%r13
  call   <printf@plt>
  cmp    %r13,%rbx
  jne    L56
L169:
  cmpl   $0x2,0x8(%rsp)
  jbe    L74
  pxor   %xmm0,%xmm0
  mov    0x18(%rsp),%rdx
  mov    %r15,%rax
  movdqa %xmm0,%xmm2
  nopw   0x0(%rax,%rax,1)
L78:
  movdqu (%rax),%xmm1
  add    $0x10,%rax
  pcmpeqd %xmm2,%xmm1
  psubd  %xmm1,%xmm0
  cmp    %rdx,%rax
  jne    L78
  movdqa %xmm0,%xmm1
  mov    0xc(%rsp),%esi
  psrldq $0x8,%xmm1
  paddd  %xmm1,%xmm0
  mov    %esi,%edx
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  cmp    %esi,%ebp
  je     L137
L3:
  movslq %edx,%rdi
  cmpl   $0x1,(%r15,%rdi,4)
  lea    0x0(,%rdi,4),%r8
  lea    0x1(%rdx),%edi
  adc    $0x0,%eax
  cmp    %ebp,%edi
  je     L137
  cmpl   $0x1,0x4(%r15,%r8,1)
  adc    $0x0,%eax
  add    $0x2,%edx
  cmp    %edx,%ebp
  je     L137
  cmpl   $0x1,0x8(%r15,%r8,1)
  adc    $0x0,%eax
L137:
  cmp    %eax,%ebp
  je     L26
  xor    %eax,%eax
  cmpl   $0x1,0x8(%rsp)
  lea    -0x3(%rbp),%edx
  jne    L237
  jmp    L154
  nopl   0x0(%rax)
L40:
  movl   $0x1,0x4(%r12,%rax,4)
  lea    0x1(%rax),%rcx
  cmp    %rax,%rdx
  je     L27
L54:
  mov    %rcx,%rax
L237:
  mov    0x20(%rsp),%rcx
  movl   $0x0,(%r12)
  movl   $0x0,(%rcx)
  mov    0x8(%r15,%rax,4),%esi
  cmp    %esi,(%r15,%rax,4)
  jne    L40
  movl   $0x0,0x4(%r12,%rax,4)
  lea    0x1(%rax),%rcx
  cmp    %rax,%rdx
  jne    L54
L27:
  xor    %eax,%eax
  cmpb   $0x0,0x17(%rsp)
  mov    0x28(%rsp),%rdx
  je     L154
  nopl   0x0(%rax,%rax,1)
L214:
  movdqu (%r12,%rax,1),%xmm3
  movups %xmm3,(%r15,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L214
  cmp    0xc(%rsp),%ebp
  je     L136
  mov    0x30(%rsp),%rax
  mov    0x38(%rsp),%rcx
  mov    (%rax),%eax
  mov    %eax,(%rcx)
  cmp    0x40(%rsp),%ebp
  je     L136
  mov    0x50(%rsp),%rax
  mov    0x48(%rsp),%rsi
  mov    (%rax),%eax
  mov    %eax,(%rsi)
  cmp    0x44(%rsp),%ebp
  je     L136
  mov    0x58(%rsp),%rax
  mov    0x60(%rsp),%rcx
  mov    (%rax),%eax
  mov    %eax,(%rcx)
L136:
  subl   $0x1,0x10(%rsp)
  jne    L47
L26:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L154:
  mov    0x68(%rsp),%rcx
  xor    %eax,%eax
  nop
L59:
  mov    (%r12,%rax,4),%edx
  mov    %edx,(%r15,%rax,4)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rdx,%rcx
  jne    L59
  jmp    L136
L74:
  xor    %eax,%eax
  xor    %edx,%edx
  jmp    L3
```

tool_calls: name: disassemble_data
arguments: data_label: D7
type_infered: string
name: disassemble_data
arguments: data_label: D9
type_infered: string
name: disassemble_data
arguments: data_label: D0
type_infered: string

tool: D7: .

tool: D9: 


tool: D0: *

assistant: ```c
void next_generation(int *current, int *next, int length) {
  int count = 0, count2 = 0, help = 0;
  while (count2 != 1000) {
    count = 0;
    printf("\n");
    while (count != length) {
      if (current[count] == 0)
        printf(".");
      if (current[count] == 1)
        printf("*");
      count++;
    }
    for (count = 0, help = 0; count != length; count++) {
      if (current[count] == 0)
        help++;
    }
    if (help == length)
      break;
    for (count = 1; count != length - 1; count++) {
      next[0] = 0;
      next[length - 1] = 0;
      if (current[count - 1] == current[count + 1])
        next[count] = 0;
      else
        next[count] = 1;
    }
    for (count = 0; count != length; count++) {
      current[count] = next[count];
    }
    count2++;
  }
}
```