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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x8,%esi
  mov    $0x12,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x28,%rsp
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    $0x12,%edi
  mov    %rax,%r14
  call   <calloc@plt>
  mov    %r14,%rdi
  mov    %rax,(%rsp)
  mov    %rax,%r12
  xor    %eax,%eax
  call   <assert@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <assert@plt>
L159:
  mov    $0x4,%esi
  mov    $0x12,%edi
  call   <calloc@plt>
  mov    $0x4,%esi
  mov    $0x12,%edi
  mov    %rax,(%r14,%rbx,1)
  mov    %rax,%rbp
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    %rax,(%r12,%rbx,1)
  xor    %eax,%eax
  call   <assert@plt>
  mov    (%r12,%rbx,1),%rdi
  xor    %eax,%eax
  add    $0x8,%rbx
  call   <assert@plt>
  cmp    $0x90,%rbx
  jne    L159
  mov    $0x1,%edi
  xor    %eax,%eax
  lea    D14(%rip),%r13
  call   <assert@plt>
  mov    $0x1,%edi
  xor    %eax,%eax
  lea    0x88(%r14),%rbp
  call   <assert@plt>
  mov    0x30(%r14),%rax
  mov    0x38(%r14),%rdx
  movl   $0x1,0x10(%rsp)
  movl   $0x1,0x20(%rax)
  movabs $0x100000001,%rax
  mov    %rax,0x1c(%rdx)
  mov    0x40(%r14),%rdx
  movl   $0x1,0x18(%rdx)
  mov    0x48(%r14),%rdx
  mov    %rax,0x1c(%rdx)
  mov    0x50(%r14),%rax
  movl   $0x1,0x20(%rax)
  lea    0x8(%r14),%rax
  mov    %rax,0x8(%rsp)
  lea    0x90(%r14),%rax
  mov    %rax,0x18(%rsp)
L152:
  mov    0x80(%r14),%r8
  mov    (%r14),%rcx
  mov    $0x4,%eax
  mov    0x8(%r14),%rdi
  mov    0x88(%r14),%rsi
  nopl   0x0(%rax,%rax,1)
L171:
  mov    (%r8,%rax,1),%edx
  mov    %edx,(%rcx,%rax,1)
  mov    (%rdi,%rax,1),%edx
  mov    %edx,(%rsi,%rax,1)
  add    $0x4,%rax
  cmp    $0x44,%rax
  jne    L171
  mov    0x8(%rsp),%rdx
  mov    0x18(%rsp),%rdi
  mov    %rcx,%rax
  jmp    L63
  xchg   %ax,%ax
L96:
  mov    (%rdx),%rax
  add    $0x8,%rdx
L63:
  mov    0x40(%rax),%esi
  mov    %esi,(%rax)
  mov    0x4(%rax),%esi
  mov    %esi,0x44(%rax)
  cmp    %rdx,%rdi
  jne    L96
  mov    (%rsp),%r10
  mov    $0x8,%r9d
  xor    %r12d,%r12d
  nopl   0x0(%rax)
L20:
  mov    (%r10,%r9,1),%r8
  mov    (%r14,%r9,1),%rsi
  xor    %eax,%eax
  mov    0x8(%r14,%r9,1),%rdi
  jmp    L155
  nopl   0x0(%rax)
L166:
  mov    (%rsi,%rax,1),%edx
  add    (%rcx,%rax,1),%edx
  add    $0x1,%r12d
  add    (%rdi,%rax,1),%edx
  add    0x4(%rcx,%rax,1),%edx
  add    0x4(%rdi,%rax,1),%edx
  add    0x8(%rcx,%rax,1),%edx
  add    0x8(%rsi,%rax,1),%edx
  add    0x8(%rdi,%rax,1),%edx
  sub    $0x2,%edx
  cmp    $0x1,%edx
  jbe    L150
L102:
  add    $0x4,%rax
  cmp    $0x40,%rax
  je     L29
L155:
  movl   $0x0,0x4(%r8,%rax,1)
  mov    0x4(%rsi,%rax,1),%edx
  test   %edx,%edx
  jne    L166
  mov    (%rsi,%rax,1),%edx
  add    (%rcx,%rax,1),%edx
  add    (%rdi,%rax,1),%edx
  add    0x4(%rcx,%rax,1),%edx
  add    0x4(%rdi,%rax,1),%edx
  add    0x8(%rcx,%rax,1),%edx
  add    0x8(%rsi,%rax,1),%edx
  add    0x8(%rdi,%rax,1),%edx
  cmp    $0x3,%edx
  jne    L102
L150:
  movl   $0x1,0x4(%r8,%rax,1)
  add    $0x4,%rax
  cmp    $0x40,%rax
  jne    L155
L29:
  cmp    $0x80,%r9
  je     L163
  add    $0x8,%r9
  mov    %rsi,%rcx
  jmp    L20
L163:
  mov    %r12d,0x14(%rsp)
  mov    0x8(%rsp),%r15
  mov    $0x4,%ebx
  nopl   (%rax)
L24:
  mov    %r15,%r12
  nopl   0x0(%rax,%rax,1)
L78:
  mov    (%r12),%rax
  mov    %r13,%rdi
  add    $0x8,%r12
  mov    (%rax,%rbx,1),%esi
  xor    %eax,%eax
  call   <printf@plt>
  cmp    %r12,%rbp
  jne    L78
  mov    $0xa,%edi
  add    $0x4,%rbx
  call   <putchar@plt>
  cmp    $0x44,%rbx
  jne    L24
  mov    0x14(%rsp),%edx
  mov    0x10(%rsp),%esi
  lea    D2(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    (%rsp),%r8
  xor    %edi,%edi
  nopw   0x0(%rax,%rax,1)
L177:
  mov    (%r8,%rdi,1),%rsi
  mov    (%r14,%rdi,1),%rcx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L44:
  mov    (%rsi,%rax,1),%edx
  mov    %edx,(%rcx,%rax,1)
  add    $0x4,%rax
  cmp    $0x48,%rax
  jne    L44
  add    $0x8,%rdi
  cmp    $0x90,%rdi
  jne    L177
  addl   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%eax
  cmp    $0xd,%eax
  jne    L152
  mov    (%rsp),%rbp
  xor    %ebx,%ebx
L87:
  mov    (%r14,%rbx,1),%rdi
  call   <free@plt>
  mov    0x0(%rbp,%rbx,1),%rdi
  add    $0x8,%rbx
  call   <free@plt>
  cmp    $0x90,%rbx
  jne    L87
  mov    %r14,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D14
data_type: string
name: extract_symbolic_data
arguments: data_tag: D2
data_type: string

tool: D14: %1d 

tool: D2: Step, count %2d %2d


assistant: ```c
int main(int argc, char *argv[]) {
  const int im = 16;
  const int jm = 16;
  const int imp1 = im + 1;
  const int jmp1 = jm + 1;
  const int imp2 = im + 2;
  const int jmp2 = jm + 2;
  const int nsteps = 12;
  const int periodic = 1;
  int i, j, n;
  int live, ncount;
  int **state_old;
  int **state_new;
  state_old = calloc(imp2, sizeof(int *));
  state_new = calloc(imp2, sizeof(int *));
  assert(state_old);
  assert(state_new);
  for (i = 0; i < imp2; i++) {
    state_old[i] = calloc(jmp2, sizeof(int));
    state_new[i] = calloc(jmp2, sizeof(int));
    assert(state_old[i]);
    assert(state_new[i]);
  }
  i = im / 2;
  j = jm / 2;
  assert(i >= 3 && i <= im - 2);
  assert(j >= 3);
  state_old[i - 2][j] = 1;
  state_old[i - 1][j] = 1;
  state_old[i - 1][j - 1] = 1;
  state_old[i][j - 2] = 1;
  state_old[i + 1][j] = 1;
  state_old[i + 1][j - 1] = 1;
  state_old[i + 2][j] = 1;
  for (n = 1; n <= nsteps; n++) {
    if (periodic) {
      for (j = 1; j <= jm; j++) {
        state_old[0][j] = state_old[im][j];
        state_old[imp1][j] = state_old[1][j];
      }
      for (i = 0; i <= imp1; i++) {
        state_old[i][0] = state_old[i][jm];
        state_old[i][jmp1] = state_old[i][1];
      }
    } else {
      for (j = 1; j <= jm; j++) {
        state_old[0][j] = 0;
        state_old[imp1][j] = 0;
      }
      for (i = 0; i <= imp1; i++) {
        state_old[i][0] = 0;
        state_old[i][jmp1] = 0;
      }
    }
    ncount = 0;
    for (i = 1; i <= im; i++) {
      for (j = 1; j <= jm; j++) {
        state_new[i][j] = 0;
        if (state_old[i][j])
          ncount += 1;
        live = state_old[i - 1][j - 1] + state_old[i][j - 1] + state_old[i + 1][j - 1] + state_old[i - 1][j] + state_old[i + 1][j] + state_old[i - 1][j + 1] + state_old[i][j + 1] + state_old[i + 1][j + 1];
        if (state_old[i][j]) {
          if (live == 2 || live == 3) {
            state_new[i][j] = 1;
          } else {
            state_new[i][j] = 0;
          }
        } else {
          if (live == 3) {
            state_new[i][j] = 1;
          }
        }
      }
    }
    for (j = 1; j <= jm; j++) {
      for (i = 1; i <= im; i++) {
        printf("%1d ", state_old[i][j]);
      }
      printf("\n");
    }
    printf("Step, count %2d %2d\n", n, ncount);
    for (i = 0; i < imp2; i++) {
      for (j = 0; j < jmp2; j++) {
        state_old[i][j] = state_new[i][j];
      }
    }
  }
  for (i = 0; i < imp2; i++) {
    free(state_old[i]);
    free(state_new[i]);
  }
  free(state_old);
  free(state_new);
  return 0;
}
```