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

```asm
<rotateMatrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%rcx
  mov    $0x0,%ebx
  mov    -0x44(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%edx
  sar    %edx
  mov    %edx,-0x2c(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L0
L34:
  mov    -0x34(%rbp),%edx
  mov    %edx,-0x28(%rbp)
  mov    -0x44(%rbp),%edx
  sub    $0x1,%edx
  sub    -0x34(%rbp),%edx
  mov    %edx,-0x24(%rbp)
  mov    -0x28(%rbp),%edx
  mov    %edx,-0x30(%rbp)
  jmp    L23
L14:
  mov    -0x24(%rbp),%edx
  mov    %edx,%ecx
  sub    -0x30(%rbp),%ecx
  mov    -0x28(%rbp),%edx
  add    %ecx,%edx
  mov    %edx,-0x20(%rbp)
  mov    -0x28(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x50(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%edx
  mov    %edx,-0x1c(%rbp)
  mov    -0x20(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x50(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x28(%rbp),%edx
  movslq %edx,%rsi
  movslq %eax,%rdx
  imul   %rsi,%rdx
  lea    0x0(,%rdx,4),%rsi
  mov    -0x50(%rbp),%rdx
  add    %rdx,%rsi
  mov    -0x28(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%ecx
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rsi,%rdx,4)
  mov    -0x24(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x50(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x20(%rbp),%edx
  movslq %edx,%rsi
  movslq %eax,%rdx
  imul   %rsi,%rdx
  lea    0x0(,%rdx,4),%rsi
  mov    -0x50(%rbp),%rdx
  add    %rdx,%rsi
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%ecx
  mov    -0x28(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rsi,%rdx,4)
  mov    -0x30(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x50(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x24(%rbp),%edx
  movslq %edx,%rsi
  movslq %eax,%rdx
  imul   %rsi,%rdx
  lea    0x0(,%rdx,4),%rsi
  mov    -0x50(%rbp),%rdx
  add    %rdx,%rsi
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%ecx
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rsi,%rdx,4)
  mov    -0x30(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x50(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rsi
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  mov    -0x1c(%rbp),%ecx
  mov    %ecx,(%rsi,%rdx,4)
  addl   $0x1,-0x30(%rbp)
L23:
  mov    -0x30(%rbp),%edx
  cmp    -0x24(%rbp),%edx
  jl     L14
  addl   $0x1,-0x34(%rbp)
L0:
  mov    -0x34(%rbp),%edx
  cmp    -0x2c(%rbp),%edx
  jl     L34
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void rotateMatrix(int n, int matrix[n][n]) {
  int layers = n / 2;
  for (int layer = 0; layer < layers; ++layer) {
    int first = layer;
    int last = n - 1 - layer;
    for (int i = first; i < last; ++i) {
      int offset = last - i + first;
      int top = matrix[first][i];
      matrix[first][i] = matrix[offset][first];
      matrix[offset][first] = matrix[last][offset];
      matrix[last][offset] = matrix[i][last];
      matrix[i][last] = top;
    }
  }
}
```