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

```asm
<remove_diagonals>:
  endbr64
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  call   <calc_row@plt>
  mov    %r13d,%esi
  mov    %ebx,%edi
  mov    %eax,%ebp
  call   <calc_col@plt>
  lea    0x1(%rax),%r14d
  cmp    %r14d,%ebx
  jle    L104
L146:
  add    $0x1,%ebp
  cmp    %ebx,%ebp
  jl     L176
L104:
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <calc_row@plt>
  mov    %r13d,%esi
  mov    %ebx,%edi
  mov    %eax,%ebp
  call   <calc_col@plt>
  sub    $0x1,%eax
  mov    %eax,%r14d
  js     L3
L34:
  add    $0x1,%ebp
  cmp    %ebx,%ebp
  jl     L103
L3:
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <calc_row@plt>
  mov    %r13d,%esi
  mov    %ebx,%edi
  mov    %eax,%ebp
  call   <calc_col@plt>
  lea    0x1(%rax),%r14d
  cmp    %r14d,%ebx
  jle    L67
L37:
  test   %ebp,%ebp
  jg     L31
L67:
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <calc_row@plt>
  mov    %r13d,%esi
  mov    %ebx,%edi
  mov    %eax,%ebp
  call   <calc_col@plt>
  sub    $0x1,%eax
  mov    %eax,%r13d
  js     L184
L107:
  test   %ebp,%ebp
  jg     L38
L184:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L31:
  sub    $0x1,%ebp
  mov    %r14d,%edx
  mov    %ebx,%edi
  mov    %ebp,%esi
  call   <calc_index@plt>
  cltq
  add    %r12,%rax
  cmpb   $0x71,(%rax)
  je     L24
  movb   $0x2a,(%rax)
L24:
  add    $0x1,%r14d
  cmp    %r14d,%ebx
  jne    L37
  jmp    L67
  nopw   0x0(%rax,%rax,1)
L38:
  sub    $0x1,%ebp
  mov    %r13d,%edx
  mov    %ebx,%edi
  mov    %ebp,%esi
  call   <calc_index@plt>
  cltq
  add    %r12,%rax
  cmpb   $0x71,(%rax)
  je     L98
  movb   $0x2a,(%rax)
L98:
  sub    $0x1,%r13d
  jae    L107
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L176:
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <calc_index@plt>
  cltq
  add    %r12,%rax
  cmpb   $0x71,(%rax)
  je     L7
  movb   $0x2a,(%rax)
L7:
  add    $0x1,%r14d
  cmp    %r14d,%ebx
  jne    L146
  jmp    L104
  nopl   0x0(%rax,%rax,1)
L103:
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <calc_index@plt>
  cltq
  add    %r12,%rax
  cmpb   $0x71,(%rax)
  je     L96
  movb   $0x2a,(%rax)
L96:
  sub    $0x1,%r14d
  jae    L34
  jmp    L3
```

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] = '*';
      }
    }
  }
}
```