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

```asm
<remove_diagonals>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  call   <calc_row@plt>
  mov    %r13d,%esi
  mov    %ebx,%edi
  mov    %eax,%r15d
  call   <calc_col@plt>
  lea    0x1(%rax),%ebp
  cmp    %ebp,%ebx
  jg     L147
  jmp    L38
  nopl   (%rax)
L110:
  add    $0x1,%ebp
  cmp    %ebp,%ebx
  je     L38
L147:
  lea    0x1(%r15),%r14d
  cmp    %ebx,%r14d
  jge    L110
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %ebx,%edi
  mov    %r14d,%r15d
  call   <calc_index@plt>
  cltq
  add    %r12,%rax
  cmpb   $0x71,(%rax)
  je     L110
  add    $0x1,%ebp
  movb   $0x2a,(%rax)
  cmp    %ebp,%ebx
  jne    L147
  nopl   0x0(%rax,%rax,1)
L38:
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <calc_row@plt>
  mov    %r13d,%esi
  mov    %ebx,%edi
  mov    %eax,%r15d
  call   <calc_col@plt>
  sub    $0x1,%eax
  mov    %eax,%ebp
  jns    L137
  jmp    L162
L75:
  sub    $0x1,%ebp
  jb     L162
L137:
  lea    0x1(%r15),%r14d
  cmp    %ebx,%r14d
  jge    L75
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %ebx,%edi
  mov    %r14d,%r15d
  call   <calc_index@plt>
  cltq
  add    %r12,%rax
  cmpb   $0x71,(%rax)
  je     L75
  movb   $0x2a,(%rax)
  sub    $0x1,%ebp
  jae    L137
  nop
L162:
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <calc_row@plt>
  mov    %r13d,%esi
  mov    %ebx,%edi
  mov    %eax,%r14d
  call   <calc_col@plt>
  lea    0x1(%rax),%ebp
  cmp    %ebp,%ebx
  jg     L95
  jmp    L9
L213:
  add    $0x1,%ebp
  cmp    %ebp,%ebx
  je     L9
L95:
  test   %r14d,%r14d
  jle    L213
  sub    $0x1,%r14d
  mov    %ebp,%edx
  mov    %ebx,%edi
  mov    %r14d,%esi
  call   <calc_index@plt>
  cltq
  add    %r12,%rax
  cmpb   $0x71,(%rax)
  je     L213
  add    $0x1,%ebp
  movb   $0x2a,(%rax)
  cmp    %ebp,%ebx
  jne    L95
L9:
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <calc_row@plt>
  mov    %r13d,%esi
  mov    %ebx,%edi
  mov    %eax,%r14d
  call   <calc_col@plt>
  sub    $0x1,%eax
  mov    %eax,%ebp
  jns    L97
  jmp    L47
L65:
  sub    $0x1,%ebp
  jb     L47
L97:
  test   %r14d,%r14d
  jle    L65
  sub    $0x1,%r14d
  mov    %ebp,%edx
  mov    %ebx,%edi
  mov    %r14d,%esi
  call   <calc_index@plt>
  cltq
  add    %r12,%rax
  cmpb   $0x71,(%rax)
  je     L65
  movb   $0x2a,(%rax)
  sub    $0x1,%ebp
  jae    L97
L47:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void remove_diagonals(int n, int index, char *board) {
  int row;
  int col_start;
  int diag;
  row = calc_row(n, index);
  col_start = calc_col(n, index) + 1;
  for (int col = col_start; col < n; col++) {
    if (row + 1 < n) {
      row += 1;
      diag = calc_index(n, row, col);
      if (board[diag] != 'q') {
        board[diag] = '*';
      }
    }
  }
  row = calc_row(n, index);
  col_start = calc_col(n, index) - 1;
  for (int col = col_start; col > -1; col--) {
    if (row + 1 < n) {
      row += 1;
      diag = calc_index(n, row, col);
      if (board[diag] != 'q') {
        board[diag] = '*';
      }
    }
  }
  row = calc_row(n, index);
  col_start = calc_col(n, index) + 1;
  for (int col = col_start; col < n; col++) {
    if (row - 1 >= 0) {
      row -= 1;
      diag = calc_index(n, row, col);
      if (board[diag] != 'q') {
        board[diag] = '*';
      }
    }
  }
  row = calc_row(n, index);
  col_start = calc_col(n, index) - 1;
  for (int col = col_start; col > -1; col--) {
    if (row - 1 >= 0) {
      row -= 1;
      diag = calc_index(n, row, col);
      if (board[diag] != 'q') {
        board[diag] = '*';
      }
    }
  }
}
```