user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<elimination_step>:
  endbr64
  push   %r15
  push   %r14
  mov    %edi,%r14d
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  call   <new_matrix@plt>
  mov    %r13d,%esi
  mov    %r14d,%edi
  mov    %rax,(%rsp)
  call   <new_matrix@plt>
  mov    %rax,0x8(%rsp)
  test   %r14d,%r14d
  je     L64
  test   %r13d,%r13d
  je     L64
  mov    %rax,%rsi
  mov    %rax,%rcx
  mov    %r14d,%eax
  mov    %r13d,%ebp
  mov    %rax,0x18(%rsp)
  lea    (%rsi,%rax,8),%rsi
  nopl   0x0(%rax,%rax,1)
L61:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L18:
  mov    (%rcx),%rdx
  movb   $0x0,(%rdx,%rax,1)
  add    $0x1,%rax
  cmp    %rbp,%rax
  jne    L18
  add    $0x8,%rcx
  cmp    %rsi,%rcx
  jne    L61
  xor    %eax,%eax
  mov    %rbp,0x10(%rsp)
  mov    %r12,%rbp
  mov    %eax,%r15d
  xchg   %ax,%ax
L90:
  xor    %ebx,%ebx
  jmp    L131
  nopl   0x0(%rax)
L86:
  sub    $0x8,%rsp
  mov    %r14d,%ecx
  mov    %r15d,%esi
  mov    %rbp,%r9
  push   0x8(%rsp)
  mov    %r13d,%r8d
  add    $0x1,%rbx
  call   <tag_cell@plt>
  pop    %rcx
  pop    %rsi
  cmp    %rbx,0x10(%rsp)
  je     L71
L131:
  mov    (%r12),%rax
  mov    %ebx,%edx
  movzbl (%rax,%rbx,1),%edi
  test   %edi,%edi
  jne    L86
L71:
  add    $0x1,%r15d
  add    $0x8,%r12
  cmp    %r15d,%r14d
  jne    L90
  xor    %r15d,%r15d
  mov    %rbp,%rax
  mov    %r13d,%ebp
  mov    %r15,%r12
  mov    %rax,%r15
  nopl   0x0(%rax,%rax,1)
L75:
  mov    %r15,%rax
  mov    %r12d,%r13d
  mov    %r12,%r15
  xor    %ebx,%ebx
  mov    %rax,%r12
  jmp    L37
L119:
  push   0x8(%rsp)
  mov    %r12,%r9
  mov    %ebp,%r8d
  mov    %r14d,%ecx
  push   0x8(%rsp)
  mov    %r13d,%esi
  add    $0x1,%rbx
  call   <mark_delete@plt>
  pop    %rax
  pop    %rdx
  cmp    %rbx,0x10(%rsp)
  je     L13
L37:
  mov    (%r12,%r15,8),%rax
  mov    %ebx,%edx
  movzbl (%rax,%rbx,1),%edi
  test   %edi,%edi
  jne    L119
L13:
  mov    %r12,%rax
  mov    %r15,%r12
  add    $0x1,%r12
  mov    %rax,%r15
  cmp    %r12,0x18(%rsp)
  jne    L75
  mov    0x18(%rsp),%rsi
  mov    %rax,%r12
  mov    0x8(%rsp),%rax
  mov    0x10(%rsp),%rbp
  mov    %rax,%rcx
  lea    (%rax,%rsi,8),%rsi
  nopl   0x0(%rax)
L104:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L81:
  mov    (%rcx),%rdx
  cmpb   $0x0,(%rdx,%rax,1)
  je     L102
  mov    (%r12),%rdx
  movb   $0x0,(%rdx,%rax,1)
L102:
  add    $0x1,%rax
  cmp    %rbp,%rax
  jne    L81
  add    $0x8,%rcx
  add    $0x8,%r12
  cmp    %rcx,%rsi
  jne    L104
L64:
  mov    (%rsp),%rsi
  mov    %r14d,%edi
  call   <free_matrix@plt>
  mov    0x8(%rsp),%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
unsigned char **elimination_step(const unsigned int width, const unsigned int height, unsigned char **const grid) {
  unsigned int i, j;
  unsigned int cell;
  unsigned char **const tag = new_matrix(width, height);
  unsigned char **const record = new_matrix(width, height);
  for (i = 0; i < width; i++) {
    for (j = 0; j < height; j++) {
      record[i][j] = 0;
    }
  }
  for (i = 0; i < width; i++) {
    for (j = 0; j < height; j++) {
      cell = grid[i][j];
      if (cell) {
        tag_cell(cell, i, j, width, height, grid, tag);
      } else {
        break;
      }
    }
  }
  for (i = 0; i < width; i++) {
    for (j = 0; j < height; j++) {
      cell = grid[i][j];
      if (cell) {
        mark_delete(cell, i, j, width, height, grid, tag, record);
      } else {
        break;
      }
    }
  }
  for (i = 0; i < width; i++) {
    for (j = 0; j < height; j++) {
      if (record[i][j]) {
        grid[i][j] = 0;
      }
    }
  }
  free_matrix(width, tag);
  return record;
}
```