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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D36(%rip),%r12
  push   %rbp
  push   %rbx
  lea    D2(%rip),%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%rbp
  nopl   (%rax)
L115:
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  lea    -0x1(%rax),%edx
  cmp    $0x12,%edx
  ja     L115
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    0x14(%rsp),%eax
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,(%rsp)
  movslq 0x14(%rsp),%rax
  movl   $0x2,(%r12,%rax,4)
  mov    0x14(%rsp),%edx
  test   %edx,%edx
  jle    L97
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  lea    D29(%rip),%r13
  nopl   (%rax)
L75:
  lea    (%r12,%r15,4),%rbx
  mov    %r13,%rdi
  mov    %rbx,%rsi
  call   <scanf@plt>
  mov    (%rbx),%eax
  cmp    $0x1,%eax
  ja     L30
  mov    (%rsp),%rcx
  add    $0x1,%ebp
  mov    %eax,(%rcx,%r15,4)
  mov    0x14(%rsp),%edx
  cmp    %ebp,%edx
  jle    L97
  movslq %ebp,%r15
  jmp    L75
  xchg   %ax,%ax
L30:
  mov    0x14(%rsp),%edx
  cmp    %edx,%ebp
  jl     L75
L97:
  movl   $0x3e8,0xc(%rsp)
  lea    D26(%rip),%rbp
  nopw   0x0(%rax,%rax,1)
L59:
  mov    (%rsp),%r14
  mov    %r12,%rdi
  mov    %r14,%rsi
  call   <next_generation@plt>
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L101
  mov    %r12,%rbx
  xor    %r13d,%r13d
  xor    %r15d,%r15d
  sub    %r12,%r14
  nopl   0x0(%rax,%rax,1)
L77:
  cmpl   $0x1,(%rbx)
  mov    %rbp,%rdi
  sbb    %esi,%esi
  xor    %eax,%eax
  add    $0x1,%r15d
  and    $0x4,%esi
  add    $0x2a,%esi
  call   <printf@plt>
  mov    (%r14,%rbx,1),%eax
  add    (%rbx),%r13d
  add    $0x4,%rbx
  mov    %eax,-0x4(%rbx)
  cmp    %r15d,0x14(%rsp)
  jg     L77
  mov    $0xa,%edi
  call   <putchar@plt>
  test   %r13d,%r13d
  je     L98
  subl   $0x1,0xc(%rsp)
  je     L98
  mov    0x14(%rsp),%edx
  jmp    L59
  nopw   0x0(%rax,%rax,1)
L101:
  mov    $0xa,%edi
  call   <putchar@plt>
L98:
  mov    %r12,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x28,%rsp
  mov    $0x1a4,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D36
type_infered: string
name: disassemble_data
arguments: data_label: D2
type_infered: string
name: disassemble_data
arguments: data_label: D29
type_infered: string
name: disassemble_data
arguments: data_label: D26
type_infered: string

tool: D36: Enter N: 

tool: D2: %d%*c

tool: D29: %d

tool: D26: %c 

assistant: ```c
int main() {
  int *curr, *next, n, i = 0;
  do
    scanf("%d%*c", ({
            printf("Enter N: ");
            &n;
          }));
  while (n <= 0 || n >= 20);
  curr = (int *)malloc(sizeof(int) * n);
  next = (int *)malloc(sizeof(int) * n);
  curr[n] = 2;
  for (; i < n; i++) {
    scanf("%d", (curr + i));
    if (!(curr[i] == 0 || curr[i] == 1)) {
      i--;
      continue;
    }
    next[i] = curr[i];
  }
  i = 0;
  do {
    next_generation(curr, next, n);
    {
      int i = 0, flag = 0;
      for (; i < n; i++) {
        printf("%c ", (curr[i] == 0) ? '.' : '*');
        flag += curr[i];
        curr[i] = next[i];
      }
      printf("\n");
      if (!flag)
        break;
    }
  } while (++i < 1000);
  free(curr);
  free(next);
  return 420;
}
```