user: 请从给定的汇编指令推导出C源代码：

```asm
<run_life>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    D20(%rip),%r13
  mov    %rdi,-0x58(%rbp)
  mov    %rsp,%rcx
  movslq 0x0(%r13),%rdx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0x0(,%rdx,4),%rax
  mov    %rdx,%r10
  mov    %rax,-0x50(%rbp)
  mov    D25(%rip),%rax
  movslq (%rax),%rax
  mov    %eax,-0x44(%rbp)
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L22
L15:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L15
L22:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L30
L13:
  mov    -0x44(%rbp),%eax
  mov    %rsp,%r11
  test   %eax,%eax
  jle    L106
  mov    -0x58(%rbp),%r9
  mov    -0x44(%rbp),%eax
  xor    %edi,%edi
  mov    %r11,-0x68(%rbp)
  mov    %r11,%rbx
  xor    %r14d,%r14d
  lea    0x1(%r10),%r15d
  mov    %edi,%r12d
  sub    $0x1,%eax
  mov    %r9,-0x60(%rbp)
  mov    %eax,-0x48(%rbp)
  lea    -0x1(%r10),%eax
  mov    %eax,%r11d
  nopl   0x0(%rax,%rax,1)
L111:
  mov    %r12d,%edx
  add    $0x1,%r12d
  test   %r10d,%r10d
  jle    L25
  test   %edx,%edx
  lea    -0x1(%rdx),%eax
  cmove  -0x48(%rbp),%eax
  mov    -0x58(%rbp),%rsi
  mov    %r14d,%r8d
  mov    $0x1,%edx
  movslq %eax,%rdi
  mov    -0x50(%rbp),%rax
  imul   %rax,%rdi
  add    %rsi,%rdi
  cmp    %r12d,-0x44(%rbp)
  cmovg  %r12d,%r8d
  movslq %r8d,%r8
  imul   %rax,%r8
  add    %rsi,%r8
  jmp    L4
  nop
L67:
  xor    %esi,%esi
  cmp    $0x3,%eax
  sete   %sil
L63:
  mov    %esi,-0x4(%rbx,%rdx,4)
  add    $0x1,%rdx
  cmp    %rdx,%r15
  je     L25
L4:
  cmp    $0x1,%rdx
  lea    -0x2(%rdx),%esi
  mov    %r14d,%ecx
  mov    -0x4(%rdi,%rdx,4),%eax
  cmove  %r11d,%esi
  cmp    %edx,%r10d
  cmovg  %edx,%ecx
  movslq %esi,%rsi
  movslq %ecx,%rcx
  add    (%rdi,%rsi,4),%eax
  add    (%rdi,%rcx,4),%eax
  add    (%r9,%rsi,4),%eax
  add    (%r9,%rcx,4),%eax
  add    (%r8,%rsi,4),%eax
  add    -0x4(%r8,%rdx,4),%eax
  add    (%r8,%rcx,4),%eax
  mov    -0x4(%r9,%rdx,4),%ecx
  test   %ecx,%ecx
  je     L67
  xor    %esi,%esi
  cmp    $0x1,%ecx
  jne    L63
  sub    $0x2,%eax
  xor    %esi,%esi
  cmp    $0x1,%eax
  setbe  %sil
  mov    %esi,-0x4(%rbx,%rdx,4)
  add    $0x1,%rdx
  cmp    %rdx,%r15
  jne    L4
L25:
  mov    -0x50(%rbp),%rax
  add    %rax,%rbx
  add    %rax,%r9
  cmp    %r12d,-0x44(%rbp)
  jne    L111
  mov    -0x60(%rbp),%r12
  mov    -0x68(%rbp),%r11
  xor    %ecx,%ecx
  mov    %rax,%rsi
  nopl   0x0(%rax)
L20:
  xor    %eax,%eax
  test   %r10d,%r10d
  jle    L107
  nopw   0x0(%rax,%rax,1)
L86:
  mov    (%r11,%rax,4),%edx
  mov    %edx,(%r12,%rax,4)
  add    $0x1,%rax
  cmp    %eax,0x0(%r13)
  jg     L86
L107:
  mov    D25(%rip),%rax
  add    $0x1,%ecx
  add    %rsi,%r11
  add    %rsi,%r12
  cmp    %ecx,(%rax)
  jle    L106
  mov    0x0(%r13),%r10d
  jmp    L20
  nopl   0x0(%rax)
L106:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L115
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L30:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L13
L115:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void run_life(int grid[COLS][LINES]) {
  int i;
  int j;
  int ii;
  int jj;
  int iii;
  int jjj;
  int nei = 0;
  int newgrid[COLS][LINES];
  for (i = 0; i < COLS; i++) {
    for (j = 0; j < LINES; j++) {
      if (i - 1 < 0)
        ii = COLS - 1;
      else
        ii = i - 1;
      if (i + 1 >= COLS)
        iii = 0;
      else
        iii = i + 1;
      if (j - 1 < 0)
        jj = LINES - 1;
      else
        jj = j - 1;
      if (j + 1 >= LINES)
        jjj = 0;
      else
        jjj = j + 1;
      nei = 0;
      nei += grid[ii][jj];
      nei += grid[ii][j];
      nei += grid[ii][jjj];
      nei += grid[i][jj];
      nei += grid[i][jjj];
      nei += grid[iii][jj];
      nei += grid[iii][j];
      nei += grid[iii][jjj];
      if ((grid[i][j] == 0) && nei == 3)
        newgrid[i][j] = 1;
      else if ((grid[i][j] == 1) && (nei == 3 || nei == 2))
        newgrid[i][j] = 1;
      else
        newgrid[i][j] = 0;
    }
  }
  for (i = 0; i < COLS; i++) {
    for (j = 0; j < LINES; j++) {
      grid[i][j] = newgrid[i][j];
    }
  }
}
```