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

```asm
<next_generation>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  lea    D13(%rip),%r13
  push   %r12
  lea    D0(%rip),%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  mov    (%rdx),%eax
  test   %eax,%eax
  jg     L83
  jmp    L90
  nopl   0x0(%rax,%rax,1)
L171:
  add    $0x1,%rbp
  cmp    %ebp,(%r15)
  jle    L90
L83:
  mov    (%r14,%rbp,4),%eax
  cmp    $0x1,%eax
  je     L77
L40:
  test   %eax,%eax
  jne    L171
  mov    %r12,%rdi
  add    $0x1,%rbp
  call   <printf@plt>
  cmp    %ebp,(%r15)
  jg     L83
L90:
  lea    D51(%rip),%rdi
  lea    D0(%rip),%rbp
  call   <printf@plt>
  movl   $0x3e8,0xc(%rsp)
  mov    (%r15),%edx
  lea    D13(%rip),%r13
  nopl   0x0(%rax,%rax,1)
L36:
  mov    $0x1,%eax
  cmp    $0x2,%edx
  jle    L35
  nopw   0x0(%rax,%rax,1)
L179:
  movl   $0x0,(%rbx)
  movslq (%r15),%rdx
  movl   $0x0,-0x4(%rbx,%rdx,4)
  xor    %edx,%edx
  mov    0x4(%r14,%rax,4),%esi
  cmp    %esi,-0x4(%r14,%rax,4)
  setne  %dl
  mov    %edx,(%rbx,%rax,4)
  mov    (%r15),%edx
  add    $0x1,%rax
  lea    -0x1(%rdx),%ecx
  cmp    %eax,%ecx
  jg     L179
L35:
  xor    %r12d,%r12d
  test   %edx,%edx
  jg     L27
  jmp    L105
  nopw   0x0(%rax,%rax,1)
L160:
  mov    %rbp,%rdi
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %r12d,(%r15)
  jle    L105
L27:
  cmpl   $0x1,(%rbx,%r12,4)
  jne    L160
  mov    %r13,%rdi
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %r12d,(%r15)
  jg     L27
L105:
  lea    D51(%rip),%rdi
  call   <printf@plt>
  mov    (%r15),%esi
  test   %esi,%esi
  jle    L79
  lea    -0x1(%rsi),%edx
  mov    %rbx,%rax
  lea    0x4(%rbx,%rdx,4),%rcx
  xor    %edx,%edx
  nopl   0x0(%rax)
L34:
  cmpl   $0x1,(%rax)
  adc    $0x0,%edx
  add    $0x4,%rax
  cmp    %rax,%rcx
  jne    L34
  cmp    %esi,%edx
  je     L79
  xor    %eax,%eax
  nopl   (%rax)
L55:
  mov    (%rbx,%rax,4),%edx
  mov    %edx,(%r14,%rax,4)
  mov    (%r15),%edx
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L55
  subl   $0x1,0xc(%rsp)
  jne    L36
L79:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L77:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    (%r14,%rbp,4),%eax
  jmp    L40
```

tool_calls: name: extract_symbolic_data
arguments: label: D13
datatype: string
name: extract_symbolic_data
arguments: label: D0
datatype: string
name: extract_symbolic_data
arguments: label: D51
datatype: string

tool: D13: *

tool: D0: .

tool: D51: 


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