user: What would the C source look like for the assembly code provided here?

```asm
<next_generation>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  lea    D59(%rip),%r13
  push   %r12
  lea    D42(%rip),%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  mov    (%rdx),%eax
  test   %eax,%eax
  jle    L268
  nopl   0x0(%rax)
L221:
  mov    (%r14,%rbp,4),%eax
  cmp    $0x1,%eax
  je     L226
L197:
  test   %eax,%eax
  je     L134
  add    $0x1,%rbp
  cmp    %ebp,(%r15)
  jg     L221
L268:
  lea    D32(%rip),%rdi
  lea    D42(%rip),%rbp
  call   <printf@plt>
  movl   $0x3e8,0xc(%rsp)
  mov    (%r15),%edx
  lea    D59(%rip),%r13
  nopl   0x0(%rax,%rax,1)
L165:
  mov    $0x1,%eax
  cmp    $0x2,%edx
  jg     L41
  jmp    L176
  nopl   0x0(%rax)
L179:
  movl   $0x1,(%rbx,%rax,4)
  mov    (%r15),%edx
  add    $0x1,%rax
  lea    -0x1(%rdx),%ecx
  cmp    %eax,%ecx
  jle    L176
L41:
  movl   $0x0,(%rbx)
  movslq (%r15),%rdx
  movl   $0x0,-0x4(%rbx,%rdx,4)
  mov    0x4(%r14,%rax,4),%esi
  cmp    %esi,-0x4(%r14,%rax,4)
  jne    L179
  movl   $0x0,(%rbx,%rax,4)
  mov    (%r15),%edx
  add    $0x1,%rax
  lea    -0x1(%rdx),%ecx
  cmp    %eax,%ecx
  jg     L41
L176:
  xor    %r12d,%r12d
  test   %edx,%edx
  jle    L218
  xchg   %ax,%ax
L101:
  cmpl   $0x1,(%rbx,%r12,4)
  je     L154
  mov    %rbp,%rdi
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %r12d,(%r15)
  jg     L101
L218:
  lea    D32(%rip),%rdi
  call   <printf@plt>
  mov    (%r15),%edx
  test   %edx,%edx
  jle    L231
  lea    -0x1(%rdx),%eax
  cmp    $0x2,%eax
  jbe    L265
  mov    %edx,%ecx
  pxor   %xmm0,%xmm0
  mov    %rbx,%rax
  shr    $0x2,%ecx
  movdqa %xmm0,%xmm2
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  lea    0x10(%rbx,%rcx,1),%rcx
  nopl   0x0(%rax,%rax,1)
L60:
  movdqu (%rax),%xmm1
  add    $0x10,%rax
  pcmpeqd %xmm2,%xmm1
  psubd  %xmm1,%xmm0
  cmp    %rcx,%rax
  jne    L60
  movdqa %xmm0,%xmm1
  mov    %edx,%ecx
  psrldq $0x8,%xmm1
  and    $0xfffffffc,%ecx
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  test   $0x3,%dl
  je     L57
L11:
  movslq %ecx,%rsi
  cmpl   $0x1,(%rbx,%rsi,4)
  lea    0x0(,%rsi,4),%rdi
  lea    0x1(%rcx),%esi
  adc    $0x0,%eax
  cmp    %edx,%esi
  jge    L57
  cmpl   $0x1,0x4(%rbx,%rdi,1)
  adc    $0x0,%eax
  add    $0x2,%ecx
  cmp    %edx,%ecx
  jge    L57
  cmpl   $0x1,0x8(%rbx,%rdi,1)
  adc    $0x0,%eax
L57:
  cmp    %eax,%edx
  je     L231
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L86:
  mov    (%rbx,%rax,4),%edx
  mov    %edx,(%r14,%rax,4)
  mov    (%r15),%edx
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L86
  subl   $0x1,0xc(%rsp)
  jne    L165
L231:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L154:
  mov    %r13,%rdi
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %r12d,(%r15)
  jg     L101
  jmp    L218
  nopw   0x0(%rax,%rax,1)
L134:
  mov    %r12,%rdi
  add    $0x1,%rbp
  call   <printf@plt>
  cmp    %ebp,(%r15)
  jle    L268
  mov    (%r14,%rbp,4),%eax
  cmp    $0x1,%eax
  jne    L197
L226:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    (%r14,%rbp,4),%eax
  jmp    L197
L265:
  xor    %eax,%eax
  xor    %ecx,%ecx
  jmp    L11
```

tool_calls: name: read_data
arguments: data_tag: D59
data_type: string
name: read_data
arguments: data_tag: D42
data_type: string
name: read_data
arguments: data_tag: D32
data_type: string

tool: D59: *

tool: D42: .

tool: D32: 


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];
  }
}
```